Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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.

share|improve this question

2 Answers

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

It should be like:

..query?querytext='path=path1+path=path2'
share|improve this answer

I find it hard to find info on sharepoint as well, a lot of trial and errors.

But I came across this http://msdn.microsoft.com/en-us/library/ff394606.aspx when I was working on it. It is using Fast Query Language to do the and/or/ornot condition, equals/lessthan etc...

What you can try is

..query?querytext='and(path:equals(path1), path:equals(path2))'

I can dig out the answer for u at work tomorrow, don't really remember, but that site above helped alot.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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