0

I m useing the SP Search API to get results from a subsite with http://localhost/_api/search/query?querytext='test path:http://localhost/subsite works fine , but it also returns the results of the sub-subsites like http://localhost/subsite/website . How do I have to modify the url to exclude the sub-subsites from the search ?

Thank you for your help

0

Not.

Search searches everywhere it is allowed to search (index)

If you don't want things from subsites in the index you need to exclude them from being indexed in site settings or library settings

0

I found a soloution . you can use WebId= instead of path:

for example:

http://localhost/_api/search/query?querytext='test+WebId="5c11e9b9-3182-444e-a2d4-c04db13c474f"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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