Question

I have a library with 7 folders. I want to include the results of my search from 4 folders only not all of the library. I need the query syntax what we need to use in search result web part as i don't see any documentation to work with folders for search query.

Était-ce utile?

La solution

Update the Ahmad Zia’s reply:

You need to enter the query path:http://<server>/<site>/<libray>/<folder> without “Forms”.

For example:

path:http://sp/sites/team/Doc1/f1

path:http://sp/sites/team/Doc1/2018

(“Doc1” is the library name, “f1” and “2018” are folder names)

enter image description here

Autres conseils

The query syntax for multiple paths is

(path:"http://site/library/Forms/Forms1/*" OR path:"http://site/library/Forms/Forms2/*")

This should search only in two folders Forms1 and Forms2 of library. You can extend this for 7 folders

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top