0

SharePoint onPremise - 2013. I'm attempting to use the following string, and get errors.

'contentclass:"STS_Web" OR contentclass:"STS_List_DocumentLibrary"';

It works perfectly if I specify a single contentclass.

0

I have tested your scenario and seems working fine with below syntax.

<<site url>>/_api/search/query?querytext='(contentclass="STS_Web" OR contentclass="STS_List_DocumentLibrary")'

See if this works for you

  • onPrem or O365? – Oxossi Mar 31 '17 at 20:40
  • O365 Environment – Venkat Konjeti Mar 31 '17 at 20:45
  • That might be it - I'm using an onPrem system. 2013. – Oxossi Mar 31 '17 at 20:54
  • This works fine for me in Office 365. The double quotes are optional. – Matthew McDermott Apr 1 '17 at 14:51
  • I'm running the query in an onPrem environment. It fails. It also fails with "=". I have to use the ":" character. (Contains rather than equal to). – Oxossi Apr 1 '17 at 15:51

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.