Search operators

To refine search results, Nuix allows you to combine two or more query types with one or both the following types of search operator:

Logical or Boolean operators

Proximity operators

Results will vary based on the use of operators in a query. This is governed by two factors:

Precedence - refers to the order in which operators are processed in a query.

Grouping - refers to how combining two or more expressions in a query using parentheses affects the order or precedence when retrieving the desired data.

Note: It is important to understand how both governance and precedence affect searching.

Recommended: To ensure an optimum set of results return, use precedence and grouping when constructing your search terms.

Operator precedence

In a search using query operators, they execute in the following order of precedence:

Order

Operator

Notes

1.

Slop suffix ('~n')

Only use with:

Quoted queries

Quoted wildcard queries

Exact queries

Regular expression queries

2.

Fuzzy suffix ('~')

Only use with unquoted queries.

3.

Groups ( '(' ... ')' )

-

4.

Field prefix ('field:')

-

5.

Alternate logical operators (‘+’, '-')

-

6.

NOT

-

7.

W/n, PRE/n, NOT W/n, NOT PRE/n

-

8.

AND

The default operator

9.

OR

-

 

Note: When you do not explicitly use an operator between two terms, use the AND operator between terms.

Example:

Query string

Results

John AND Jenny OR Tom AND Jerry

Operator precedence means this is equivalent to:

(John AND Jenny) OR (Tom AND Jerry), and is not equivalent to

((John AND Jenny) OR Tom) AND Jerry

Operator grouping

Use parentheses to group expressions with an operator. The expression in parentheses is evaluated as a separate query first, and its results are then used to evaluate the rest of the expression that is not enclosed in parentheses.

Examples:

Query string

Results

(Joe AND Bloggs) OR Smith

Matches all items containing both "Joe" and "Bloggs", or only "Smith" (so would match an item containing "Keith Smith").

Joe AND (Bloggs OR Smith)

Matches all items containing both "Joe", and either "Bloggs" or "Smith" (so would not match "Keith Smith" but would match "Joe Bloggs").

Escaping special characters

Use a backslash (\) to escape special characters. Use this search operator when you need to include special characters in your search.

For fields like "content" where these special characters are also treated as punctuation anyway, this is not particularly useful, but it can be useful for fields like "tags" where natural language analysis is not performed.

Example:

Query string

Results

tag:Blog\*

Matches all items with the tag "Blog*".