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
https://example.com/sites/search/_api/search/query?querytext=%27workflowhistory%27-path:%27*/lists/workflowhistory/*%27
https://example.com/sites/search/_api/search/query?querytext=%27workflowhistory%27&-path:%27/lists/workflowhistory/%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?