exclude Document Set content type from showing in search results
-
10-12-2019 - |
Question
i am trying to create a result source by excluding the document set content type.
I tried by using
http://server/site1/published/
NOT ContentType:0x0120D52000FF378E63893F7C449BE61EF8221FE8AB
But it is not working.
I am trying to do in sharepoint 2013 and using query builder.
Please help...
Solution 3
i tried by using
NOT ContentTypeID:0x0120D520*
and it gave me the expected result
OTHER TIPS
Is your problem related to this topic Ignore content type on search ?
Or this might help you - specify IsDocument:1 http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/08/26/excluding-folders-from-search-results.aspx
I'm afraid your actual Content Type Id is wrong (it might actually be a child content type of the DocumentSet - most like recovered directly from a Document Library where Document Set has been added). The base Content Type Id is actually 0x0120D520
This being said, you would actually be able to use Content Class (see here http://spreflections.wordpress.com/2010/04/18/leverage-search-crawl-rules-and-content-class-property-to-refine-sharepoint-search-result/ for details) to exclude it.
How you put in place is different either by creating a Search Scope (e.g. an Exclude Rule for the "ContentClass = DocumentSet") or by code in your component (e.g. web part, etc.).