How to add multiple filters to a property in Search api Sharepoint
-
21-01-2021 - |
문제
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 ?
해결책
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
제휴하지 않습니다 sharepoint.stackexchange