Modern Library Search

%3CLINGO-SUB%20id%3D%22lingo-sub-480156%22%20slang%3D%22en-US%22%3EModern%20Library%20Search%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-480156%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20client%20that%20is%20requesting%20the%20search%20results%20from%20library%20level%20only%20return%20folder%20content%20type.%26nbsp%3B%20I%20have%20MS%20support%20saying%20this%20is%20not%20possible.%26nbsp%3B%20Does%20anyone%20know%20of%20a%20way%20to%20filter%20the%20search%20results%20from%20a%20modern%20library%20to%26nbsp%3B%20only%20show%20folders%20and%20not%20the%20content%20in%20the%20folders%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-480156%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-480418%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20Library%20Search%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-480418%22%20slang%3D%22en-US%22%3EAre%20you%20talking%20about%20search%20in%20modern%20document%20libraries%3F%20If%20so%2C%20what%20support%20has%20told%20you%20is%20correct%20so%20your%20options%20here%20can%20be%3A%3CBR%20%2F%3E(1)%20Rely%20on%20the%20filters%20panel%20in%20the%20document%20library%3CBR%20%2F%3E(2)%20Develop%20a%20custom%20search%20solution%20that%20can%20be%20called%20from%20your%20document%20library...for%20instance%2C%20a%20SPFx%20Extension%20that%20opens%20a%20side%20panel%20or%20a%20popup%20where%20you%20can%20search%20by%20folder%20content%20type%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-480436%22%20slang%3D%22en-US%22%3ERe%3A%20Modern%20Library%20Search%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-480436%22%20slang%3D%22en-US%22%3EThere%20is%20an%20open%20source%20solution%20available%20at%3A%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Festruyf%2Freact-handlebars-search%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Festruyf%2Freact-handlebars-search%3C%2FA%3E.%20Note%20that%20this%20will%20not%20replace%20the%20existing%20search%20boxes%20but%20is%20something%20you%20could%20add%20to%20a%20page%20and%20point%20your%20users%20to%20it.%20This%20web%20part%20more%20or%20less%20emulates%20what%20we%20had%20available%20in%20classic.%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I have a client that is requesting the search results from library level only return folder content type.  I have MS support saying this is not possible.  Does anyone know of a way to filter the search results from a modern library to  only show folders and not the content in the folders?

2 Replies
Highlighted
Are you talking about search in modern document libraries? If so, what support has told you is correct so your options here can be:
(1) Rely on the filters panel in the document library
(2) Develop a custom search solution that can be called from your document library...for instance, a SPFx Extension that opens a side panel or a popup where you can search by folder content type
Highlighted
There is an open source solution available at: https://github.com/estruyf/react-handlebars-search. Note that this will not replace the existing search boxes but is something you could add to a page and point your users to it. This web part more or less emulates what we had available in classic.