2

I have a library with lots of folders and documents. When I am using the default search box within the library (marked red)

enter image description here

I am always looking just for the documents, but the results include all the folders as well (I think the ones that have my query text in their URL property)

How do I remove all the folders from the results?

NOTE: I need this for only this particular library, it should not affect other search results in any way. Is there something in library settings that I'm missing?

I am using SharePoint Online

  • Have you tried adding IsDocument=1 to your query? – Matthew McDermott Jun 1 '16 at 12:48
  • @MatthewMcDermott It works if I add it in the search box, but I want it to be automatic – Gintas K Jun 1 '16 at 12:54
1

Apparently you cannot change (apart from writing it directly into the search box) as answered in this thread.

I would suggest creating a new view and filtering the by file type:

  • Type is not equal to (leave the box empty)

enter image description here

This way you can switch the view when you do not want folders to appear in your search results.

  • Thanks for the information Murilo, but the problem is that I'm also using custom tree view navigation on the library view page, so I can't exclude the folders :/ Do you know if there's a way t at least populate documents first in the results and then the folders? – Gintas K Jun 2 '16 at 10:14

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.