Question

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 ?

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top