Trying to construct Purview Content Search query that Excludes specific SharePoint location

Ian Prickett 0 Reputation points
2024-12-19T18:03:10.4033333+00:00

I'm searching SharePoint for specific data using Purview Content Search and my results are being inflated when it keeps adding examples stored in my SharePoint drive, how do I exclude my drive from the scope?

I don't have the option to exclude SharePoint locations when constructing the search, only to add individual SharePoint instead of all (we have hundreds).

I've tried the '-' and NOT operators on the 'File:' and 'documentlink;' flags but they aren't working, can anyone point me in the right direction, thanks.

Examples:

"Key Text 1" NOT documentlink:"https://XX-my.sharepoint.com/personal/my_account"

"Key Text 1" -site:"My Account"

"Key Text 1" -site:"MyLoginId"

I also tried using the - path option but it then excluded all personal SharePoint locations:

"Key Text 1" -path:“https://XX-my.sharepoint.com/personal/my_ID”

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,999 questions
Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
1,300 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.