I'm using SharePoint 2013 (on-premise) and can't seem to exclude certain back-end lists from search results.

I'm testing with "/Lists/WorkflowHistory/" and will add other lists later but I can't get this to work no matter what I do. I've tried

I've tried using the path exclusion in the Result Source > Query Transform:

{?{searchTerms} -path:"/Lists/WorkflowHistory/" -ContentClass=urn:content-class:SPSPeople} {?{searchTerms} -ContentClass=urn:content-class:SPSPeople} -path:"/Lists/WorkflowHistory/"

I've tried testing using REST (/_api/search/query?) with the following: https://example.com/sites/search/_api/search/query?querytext=%27workflowhistory%20AND%20NOT%20path:%22/lists/workflowhistory/%22%27



I even tried to exclude the PATH starting with the domain https://example.com/sites/search/_api/search/query?querytext=%27workflowhistory%27&-path:%27https://example.com/sites/test/DeptSiteDec2014/Lists/WorkFlowHistory/%27

But I'm still getting the WorkFlowHistory folders.

What am I missing? Any suggestions how to get this to work?


For excluding results you can use following query

{searchTerms} -Path=https://example.com/sites/test/DeptSiteDec2014/Lists/WorkFlowHistory/* 

You could use the list Guid like explained here: http://www.eliostruyf.com/retrieving-list-library-name-search-result-display-templates/

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.


We discovered some anomalous behavior in our environment that sometimes breaks filtering by path. We have a ticket open with Microsoft to figure out why it sometimes works continuously for weeks and then stops working for weeks.

Additionally, I learned the Path managed property is set to "Complete Matching" so it will only work when the path is provided from the beginning (http* or www.domain.*). In my case I want to exclude certain lists (e.g. "/Lists/WorkFlowHistory/") that exist in all sites so I decided to create a new managed property with "Complete Matching" turned off. For some reason the property is not getting populated, but that's another post.

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.