This is the desired scenario:

User searches for something and if that something comes from a particular list, swap out the Search Result title(link), with the list item's Url field.

If the search finds results from any other list, remove it from the results.

Is this possible? Thanks.

  • You mean you want to show results only from one list? Dec 3 '14 at 17:49
  • No, I mean I want to show everything that is NOT a list item (documents, etc), but if it comes from a particular list then add the results together with everything else and modify the main link in the display.
    – azium
    Dec 3 '14 at 17:51

You can use following query to get the result

path:"https://siteurl"  (ListID:{CC6FB9E2-92CE-444E-85C7-2E126DFF9ED0} OR contentclass<>SPListItem OR)

The above query will give you all results which are not of type SPListItem. If you observe there is an OR condition where we are including search results from a single list. So in your case you should change the GUID to the guid of your list.

Before you modify DisplayTemplate, you should include the Managed Property for Url using mso:ManagedPropertyMapping


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.