I have a issue with limiting search results using PnP Modern Search.
In addition to pulling all *.docx documents from the document library, I would like to skip those that have the name "Attachments" in the path.
Example:
- https://sp.online/sites/DEV/Documents/Test1/Attachments
- https://sp.online/sites/DEV/Documents/Test2/Attachments
- https://sp.online/sites/DEV/Documents/Test3/Attachments
- https://sp.online/sites/DEV/Documents/Test4/Attachments
I would like to find documents under Test* folders but not under Attachments. So far I have tried the following KQL query but does not work:
{searchTerms} path:https://sp.online/sites/DEV/Documents -path:https://sp.online/sites/DEV/Documents/*/Attachments/* fileextension:docx
Thank you!