3

I have a site which contain a few lists. When I search something in my site then it returns following result:

http://server/Lists/Mylist/Allitems.aspx
http://server/Lists/MyList/DispForm.aspx?ID=34
http://server/Lists/Mylist

I only want to display DispForm.aspx in search results and EXCLUDE AllItems.aspx and other views.

I set following crawl rule in CA but it excludes all results and doesn't bring anything when searching something.

http://*/AllItems.aspx

I searched on this topic and each person is telling a different story. Some say to define query rule some say to define result sources, some say this, some say that etc.

What is sure fire way of doing this?

1 Answer 1

4

I had gone through the same exercise and a good post by Mikael Svenson on doing just that helped me.

If you append -contentclass:STS_List_* to your query template within the query rule or result source, these views will all be excluded. In effect all list landing pages will be removed including:

  • AllItems.aspx
  • AllPages.aspx
  • AllPosts.aspx
  • AllCategories.aspx
  • Calendar.aspx
  • Overview.aspx

His blog post is available here

The way to get to the query builder for a Result Source is

Go to Search Administration in CA --> Result Sources --> New Result Source

enter image description here

Click Launch Query Builder

enter image description here

2
  • What exactly is this query template? Aug 17, 2016 at 21:30
  • The query template would be the query field that is available to you when you create a result source. I have added a screenshot above. Aug 18, 2016 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.