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.
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