0

I am trying below search query to search document from specific library but now this library have nested folders where documents are kept , how to modify my query so it only search for documents (pdf,doc,xls) not show folders

query which i am using now

path:"https://Sharepoint.com/sites/Test1/Lib1*" 
path:"https://Sharepoint.com/sites/Test2/Lib2*"
path:"https://Sharepoint.com/sites/Test3/LIb3*" 
path:"https://Sharepoint.com/sites/Test4/Lib4*" 
1

1 Answer 1

2

You can search for documents only by adding this query part:

IsDocument:"True"

If you want to narrow it down to specific extensions, you can use this:

(FileExtension:doc OR FileExtension:docx OR FileExtension:xls OR FileExtension:xlsx OR FileExtension:ppt OR FileExtension:pptx OR FileExtension:pdf) (IsDocument:"True" OR contentclass:"STS_ListItem")

(extracted from the Documents result source)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.