Unable to see documents when searching by folders in Modern Document Libraries

Brass Contributor
Hi everyone, 
 
I am seeing some odd behaviour with modern document libraries when you try to search for content stored in folders. Lets say you have the following structure in a document library:
 
  • Folder named "James"
    • File named "P45"
    • File named "P11D"
  • Folder named "Gary"
    • File named "P45"
    • File named "P11D"
 
Modern Experience:
If you do a search in the "Search" box in the top-left corner for the word James then you will see the James folder returned. If you then click into the folder you don't see any documents shown such as the P45 or P11D docs, with a message saying "No items match your query". 
 
Classic Experience:
If you switch to classic experience and do a search for James in the "Find a File" box, you will see the James folder returned. When you click into the folder you will then see the two files, P45 and P11D. 
 
The modern search is appears to be doing a search on items that contain the phrase "James" in the filename or in the document, where as the classic experience is doing more of a filter on the current items being displayed and then allowing you to see the child items in that folder. 
 
If you search in a modern experience, you can then see the child documents if you remember to clear your search query from the search box, or if you remember to not press the Enter key at the end of typing your search query and use either the mouse or keyboard to select the folder from the auto-suggestions. If you do choose a folder from the auto-suggestions then this opens in a new tab taking you away from where you were originally working. 
 
This has been reported by users and clients as a significant pain in the user experience when searching for content and is causing push back on adoption of SharePoint. 
 
Have you guys seen this before?
 
Cheers,
4 Replies

Hi,

 

I had this case in few clients. Last two-three times we simply eliminated all folders. From that point, we have no folders in the library at all (and the client really don't need it) as well we, and the client is happy with this. It was necessary for some small adjustments to the user's behavior, but we solved this few weeks later. 

 

Tobias

Thanks @KoprowskiT, using metadata does work when searching but we have various systems that output data as a combination of folders and files and we aren't in a position to change that yet (we are trying though!). 

 

Its a shame as users have used the old classic view and are experienced the way this used to work so therefore end up questioning it. 

@James Brennan I'm seeing the exact same behavior and it's very frustrating, so thank you for making this post. It seems as though the search query persists after you click on the folder and navigate into it, even though the search bar now shows as being empty.

It's like Microsoft thought you wanted to keep searching for the same query while inside the folder you were searching for. Why would I necessarily want to search for a folder called "Engineering CAD Files" then continue searching only for files with "Engineering CAD Files" in their name inside that folder? The search query should stop when you navigate into a folder that came up in the first search.

As far as I can tell, there is no way to "clear" the search query after you are in the desired folder, so you have to just look at directory path, then stop the search, then manually navigate back into the desired folder. Microsoft, please fix this!

Thanks!

5 years later, here I am reading about this very same problem still persisting in Modern SharePoint. My experience, refining a search with the Path: key, if you search the entire Site and Document Library path, all files are returned from that Document Library. But as soon as you tack on the name of a root folder, the search results simply return that folder and none of the files within that folder.

It's extremely frustrating to find that this limiting search behaviour still persists, even after being reported 5 years ago. :crying_face:

Keen if anyone has any suggestions for searching a Document Library (and to not use any folders isn't an option here).