Share via

Purview eDiscovery KeyQL — does adjacent )(Participants=...) without a space act as OR?

Dan Kwik 0 Reputation points
2026-05-27T03:37:57.5+00:00

I'm building Purview eDiscovery searches and ran into something the docs don't seem to cover.

The documentation page at learn.microsoft.com/en-us/purview/edisc-search-query says a space between two property:value expressions is treated as OR. That part is clear.

What I can't figure out is whether the OR still applies when there's no space between two parenthesized predicates. So for example:

with space: (Participants=a@example.com) (Participants=b@example.com)

no space: (Participants=a@example.com)(Participants=b@example.com)

Do both forms parse the same way? Or does the missing space mean the second form isn't treated as OR?

I tried looking at the SharePoint Search KQL reference too but that's a different product (whitespace means AND there, not OR) so I'm not sure those rules apply.

If anyone knows the actual parser behavior, or can point me to docs I missed, that would be great. Also curious what the recommended way to write "any of N participants" is in Purview — repeating the property with spaces, explicit OR between predicates, or something else?

Thanks.

Microsoft Security | Microsoft Purview

2 answers

Sort by: Most helpful
  1. Pilladi Padma Sai Manisha 9,945 Reputation points Microsoft External Staff Moderator
    2026-05-29T03:27:33.1+00:00

    Hi MB,
    Thankyou for reaching microsoft Q&A!
    it turns out KeyQL in Purview eDiscovery really does rely on whitespace (or an explicit OR) to split clauses. If you run

    (Participants=a@example.com)(Participants=b@example.com)

    with no space between the two parenthesized predicates, the parser won’t treat it as “OR” – you’ll either get a syntax warning or only the first predicate will be picked up.

    The supported ways to express “any of these N participants” are:

    • Using whitespace (implicit OR)

    (Participants=a@example.com) (Participants=b@example.com)

    • Using the OR operator

    Participants=a@example.com OR Participants=b@example.com

    • Grouping values under one property

    Participants:(a@example.com b@example.com)

    I generally recommend the third form (Participants:(…)) since it’s compact and clearly signals “match any of these values.”

    Let me know if you see a specific error in the KeyQL editor when you try the no-space version, or if you need any other examples!

    Reference List

    1. Use Keyword Query Language to create search queries in eDiscovery – https://learn.microsoft.com/purview/edisc-keyword-query-language
    2. Search queries in eDiscovery (Properties & Boolean logic) – https://learn.microsoft.com/purview/edisc-search-query

    Was this answer helpful?


  2. AI answer

    2026-05-27T03:38:11.6966667+00:00

    KeyQL in Purview eDiscovery treats Boolean logic based on explicit operators and the documented handling of spaces, not on adjacency of parentheses.

    From the eDiscovery search tips and KeyQL guidance:

    • A space between two keywords or two property:value expressions is equivalent to using OR in eDiscovery search queries.
    • Boolean operators AND, OR, NOT, and NEAR must be uppercase and are used in the KeyQL condition field.

    However, the documentation does not define any special semantics for two parenthesized expressions written back‑to‑back with no space, such as:

    • (Participants=[a@example.com]) (Participants=[b@example.com]) → documented as OR because of the space between expressions.
    • (Participants=[a@example.com])(Participants=[b@example.com]) → no documented rule that this adjacency is treated as OR, and no behavior is described for this pattern.

    Only the space case is explicitly defined as OR; there is no statement that adjacency without whitespace is supported or equivalent. Therefore, only the space‑separated form is documented as valid for “any of N participants” when not using explicit OR.

    For a documented and predictable way to express “any of N participants” in Purview eDiscovery KeyQL:

    • Use explicit OR between conditions, for example:
      • Participants=[a@example.com] OR Participants=[b@example.com]
    • Or rely on the documented space‑as‑OR behavior between conditions, for example:
      • Participants=[a@example.com] Participants=[b@example.com]

    The condition builder documentation also states that multiple values added to a single condition are connected by OR, which is another supported pattern for “any of N values” when using the condition builder UI.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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