Preventing searches in subfolders
-
27-12-2020 - |
Question
How can I prevent subfolders from document libraries appearing in search results in SharePoint online?
I can currently prevent searches and indexing on documents in a document library but I need it to prevent in subfolders rather than the entire document library.
Solution
This seems to be what you're looking for - http://blog.cognit.se/sharepoint-search-how-to-filter-out-folders/
I would probably modify the appropriate search verticals and result sources to include the ContentTypeID exclusion for the Folder content type.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange