2

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?

2

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

  • What exactly is this query template? – Frank Martin Aug 17 '16 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. – Ransher Singh Aug 18 '16 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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