Sharepoint - Include document sets in search results

To make this happen you need to add a Managed Property in your Search Service Application. You find the existing Managed Properties in the Queries and Results section named Search Schema. Type isDocument in the filter section and hit the green button with a white arrow. You should see this:

enter image description here

It tells is that the isDocument managed property returns all documents in SharePoint and that they are queryable and retrievable. But if we search for isDocumentSet or documentSet we get no results. We need to add it.

Click the Crawled Properties link just below the page title. On the crawled properties page, search for documentset and you see the ows_DocumentSetDescription. Good news! Our Search Service Application gathers the information from the document set description. Bad news, we can’t search on it (yet).

enter image description here

Go back to the Managed Properties page and click the New Managed Property link. Give it a descriptive name (isDocumentSet) and check the Queryable and Retrievable checkboxes.

enter image description here

Further down on the page, map this managed property to the ows_DocumentSetDescription crawled property. Save the property and make a full crawl (incremental should do, but just to be sure, make it a full one).

Now you have both isDocument and isDocumentSet to search for. When you search for either document or document set, your search string should be “isDocument:1 OR isDocumentSet”.

enter image description here

More to read:

  • Understand SharePoint Crawled and Managed properties for search
  • Keyword Query Language (KQL) syntax reference

Try changing your query to IsDocument=1 OR ContentType="Document Set".