0

Below is my querytext to get items from pages library and document library.

$quertText="createdby:XXX AND contentclass:STS_ListItem_850 
AND STS_ListItem_DocumentLibrary"

But it is returning 0 results.

If I use any one of contentclass property it is showing results:

$quertText="createdby:XXX AND contentclass:STS_ListItem_850"

How can I use them together ?

4
  • use it as $quertText="createdby:XXX AND contentclass:STS_ListItem_850 contentclass:STS_ListItem_DocumentLibrary " Commented Aug 3, 2018 at 12:20
  • $queryText="createdby:xxx AND contentclass:STS_ListItem_850 contentclass:STS_ListItem_DocumentLibrary" 0 results :-(
    – Swetha
    Commented Aug 3, 2018 at 12:24
  • sorry i meant $quertText="createdby:XXX contentclass:STS_ListItem_850 contentclass:STS_ListItem_DocumentLibrary " Commented Aug 3, 2018 at 12:26
  • happy to help, have posted that as answer. Would request you to please accept it by ticking the checkmark besides the answer. This will help remove the question from the unanswered section ! Thanks Commented Aug 6, 2018 at 9:32

1 Answer 1

1

Modify your code snippet as:

$quertText="createdby:XXX contentclass:STS_ListItem_850 contentclass:STS_ListItem_DocumentLibrary"

The KQL query will treat space as AND operation.

Reference - (KQL) syntax reference

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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