I want to search for content in a specific subsite in sharepoint online. How can I set scope of search to subsite in KQL using powershell csom?
I tried the following query:
$queryText="createdby:$OldAuthor contentclass:STS_ListItem_850 OR (IsDocument:1 FileType:doc* FileType:pdf* FileType:xls* FileType:ppt*) -ContentTypeId:0x0120* -path:{$siteUrl} "
But path parameter did not work and I got results from entire tenant. How can I restrict it to specific subsite?