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

3

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)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.