Operators by Priority

The query expansion modules rewrite the query based on the operators. To correctly expand the query, each operator has a priority.

See Also
The Different Types of Search in UQL
Reserved Characters in UQL
Operands
More About INNERJOIN
Table 1. Operators by Processing Priority, where e1 and e2 are Expressions

Priority

Operator

Explanation

Example

1

prefix handlers

Prefix handlers are always processed first.

Obama before:2009/01/01, searches for all documents relating to Obama before January 2009.

2

FUZZYAND/option (expression)

Search for documents that match at least N queries, where N is determined by the fuzzyand option.

This option can be either:

  • minimum success: at least N queries must match. N is a positive integer.
  • or maximum failures: up to N queries can fail. N is a negative integer.

For a document that contains:

The quick brown fox.

If min. success=2: FUZZYAND/2 (the quick brown foxes) matches, but FUZZYAND/2 (a brown foxx) does not.

If max. failure=-1: FUZZYAND/-1 (a quick brown fox) matches, but FUZZYAND/-1 (a quick foxx) does not.

3

OPT e1

Optional operator

OPT graphical

4

NOT e1

Negation operator

NOT myword

5

e1 NEXT e2

Explicit sequence operator for adjacency match.

user NEXT interface

6

e1 AFTER e2

Proximity (mono-directional) match

interface AFTER user

6

e1 AFTER/distance e2

AFTER with explicit word distance

interface AFTER/4 user

6

e1 BEFORE e2

Proximity with mono-directional match

user BEFORE interface

6

e1 BEFORE/distance e2

BEFORE with explicit word distance

interface BEFORE/4 user

7

e1 NEAR e2

Proximity operator with bidirectional match

user NEAR interface

7

e1 NEAR/distance e2

NEAR with explicit word distance

user NEAR/4 interface

8

e1 SPLIT e2

A document is returned if e1 appears in at least one of the document sections delimited by the e2 delimiter.

If the e2 delimiter is not present in a document, then the document is returned if e1 is valid at the document level.

user interface SPLIT Chapter

Matches if user interface appears between two "Chapters"

9

e1 e2

Implicit match operator on a sequence of words. It uses the implicit operator, which is AND by default.

search engine

10

(e1) INNERJOIN/key (e2)

Search for documents matching e1 where e2 appears in child documents. The relation between documents is contained in a key index field, which must be an unsigned integer.

For performance reasons, it is best to enable the Stored in Memory option.

subject:exalead INNERJOIN/msgId fulltext:france

We first select documents whose subject is exalead, then the join is made with documents containing the word france.

11

e1 BUTNOT e2

The search matches if there is at least an instance of e1 is not also an instance of e2 at the same position.

York BUTNOT "New York"

12

e1 AND e2

Explicit conjunction match.

user AND interface

13

e1 XOR e2

Exclusive OR operation. It can be either e1 OR e2, but not e1 AND e2

design XOR conception

14

e1 OR e2

Disjunction match

design OR conception

15

e1 BOR e2

Disjunction match

To use only for a fast OR on many documents

design BOR conception