Sharepoint REST Query with multiple variable for a query tag

Beytan Kurt picture Beytan Kurt · Jul 17, 2013 · Viewed 9.9k times · Source

In Sharepoint 2013, using Search REST API; I can get a result by using path in querytext query tag, like this:

http://host/_api/search/query?querytext='path=http://host/site/pages/index.aspx'

The problem is, I need to make multiple conditions for path to get result of both:

path='http://host/site/pages/index.aspx' and path='http://host/site/pages/someother.aspx'

I've tried the following sytax examples, but couldn't managed to get result:

..query?querytext='path=path1,path2'

..query?querytext='path=path1;path2'

..query?querytext='path=path1,path=path2'

..query?querytext='path=path1 or path2'

..query?querytext='path=((path1)or(path2))'

..query?querytext='path=path1'&querytext='path=path2'

and most probably a lot more.

Thanks in advance.

Answer

Beytan Kurt picture Beytan Kurt · Jul 17, 2013

Now, using Sharepoint 2013 Seach Query Tool, I've found the syntax by chance.

It should be like:

..query?querytext='path=path1+path=path2'