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.
11,004 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,304 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Prickett 0 Reputation points
    2024-12-26T22:52:08.34+00:00

    The correct answer is that the 'documentlink' parameter is missing the trailing /*.

    It should read as follows:

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

    0 comments No comments

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.