Forum Discussion

ellan1537's avatar
ellan1537
Iron Contributor
Feb 08, 2024

Exclude items from Preservation Hold Library from appearing in search results

Our tenant is huge and majority of sites (SharePoint/OneDrive) have 'Preservation Hold Library' because of retention policies. 

Question: Is there a way to hide the preservation hold library files from appearing in search when used search query template?

Currently I'm kind of using below search query (for OneDrive) but no use. Any feedback is greatly appreciated!

 

(SPSiteURL:https://xxxxx-my.sharepoint.com/personal/* AND -SPSiteURL:https://xxxxx-my.sharepoint.com/personal/*/P*)

 

FYI, SPSiteURL is a property

2 Replies

  • ellan1537's avatar
    ellan1537
    Iron Contributor
    So, per my understanding and research, there is NO way to block preservation hold library files (tenant wide) from appearing in search when used search query template.
  • Yeah, would also be nice for MS to stop surfacing items held in the PHL in "recent" and such...

Resources