0

how can I search in specific folder of a list in SharePoint 2013 with the API?

A lot of tries of me failed :(

http://localhost/_api/search/query?querytext='*B*+AND+List:DocumentLibList'&clienttype='ContentSearchRegular'

or

http://localhost/_api/search/query?querytext='*B*+AND+path:"http://localhost/sites/MainSite/DevSite/DocumentLibList"'&clienttype='ContentSearchRegular'

I need a fulltext search for a specific folder of the DocumentLibList. Optional with filtering properties of the documents - if possible.

Thanks in Advance for any idea(s)! ;)

Patrick
  • 829
  • 2
  • 13
  • 34

1 Answers1

0

Have you tried using an asterisk by the end of the path string? Also, you could try using the site: filter passing the absolute path to the folder as a value.

http://localhost/_api/search/query?querytext='*B*+site:"http://yourserver/yourlibrary/yourfolder"'

The SharePoint 2013 Search Query Tool would be helpful in this trial and error process:

https://sp2013searchtool.codeplex.com/

Lucas Rodrigues
  • 1,234
  • 2
  • 11
  • 22