The query expansion modules rewrite the query based on the operators. To correctly expand the query each operator has a priority. In the following tables let e1 be an expression, s1 its score, e2 be an expression, s2 its score. The following sections include a priority summary table followed by specific details of the supported operators.
Priority |
Operator |
Explanation |
Predicate value |
Operation on scores |
Example |
1 |
prefix handlers |
see Priority 1 operators |
|||
2 |
NOT e1 |
Negation; see the Priority 2 operators |
NOT e1 |
s1 |
NOT myword |
2 |
OPT e1 |
Optional pure ranking term. |
Always true |
s1 if e1 is true, 0 otherwise |
OPT graphical |
3 |
e1 NEAR e2 |
Proximity (bi-directional) match; see the Priority 3 operators |
e1 AND e2 if the words are close enough in document. |
s1+s2 |
user NEAR interface |
3 |
e1 NEAR/distance |
NEAR with explicit distance |
e1 AND e2 if the words are close enough in document. |
s1+s2 |
user NEAR/4 interface |
3 |
e1 AFTER e2 |
Proximity (mono-directional) match |
e1 AND e2 if the words are close enough in document and e1 is after e2. |
s1+s2 |
interface AFTER user |
3 |
e1 AFTER/distance |
AFTER with explicit distance |
e1 AND e2 if the words are close enough in document and e1 is after e2. |
s1+s2 |
interface AFTER/4 user |
3 |
e1 BEFORE e2 |
Proximity (mono-directional) match |
e1 AND e2 if the words are close enough in document and e1 is before e2. |
s1+s2 |
user BEFORE interface |
4 |
e1 NEXT e2 |
Explicit sequence operator for adjacency match. |
e1 AND e2 if the words are adjacent in this order in the document. |
s1+s2 |
user NEXT interface |
5 |
e1 e2 |
Implicit sequence match operator on a sequence of words, equivalent to AND |
e1 AND e2 |
s1+s2 |
search engine |
6 |
e1 MIN e2 |
Conjunction match operator; performs matching of e1 AND e2 and then keeps the maximum score. |
e1 AND e2 |
MAX(s1,s2) |
user MIN interface |
6 |
e1 BUTNOT e2 |
expr2 must be a sequence match. The operator will match if there is at least an instance of e1 which is not also an instance of e2 at the same position. |
e1 |
s1 |
New BUTNOT "New York" will match if there is at least an instance of the word "new" not followed by "york" |
6 |
e1 SPLIT e2 |
A document is returned if the e1 expression is valid in at least one of the sections of the document delimited by occurrences of the e2 separator expression. As a consequence, note that if the separator e2 is not present in a document, then the document is returned if e1 is valid at the document level. Note that the split operator cannot be nested. |
e1 |
s1 |
"user interface" SPLIT Chapter.
Matches if "user interface" is found between two "Chapters" |
6 |
(expr1) INNERJOIN/key (expr2) |
Search for documents matching expr1 where expr2 is found in child documents. The relation of documents is contained in the key index field where the LSB is 1 in case of a master document, otherwise 0. The key field Type must be Unsigned integer. For performance reasons, Exalead recommends you enable the Stored in Memory option. |
(expr1) INNERJOIN/key (expr2) |
s1+s2 |
subject:exalead INNERJOIN/msgId fulltext:france |
7 |
e1 AND e2 |
Simple conjunction match |
e1 AND e2 |
s1+s2 |
user AND interface |
8 |
e1 MAX e2 |
Disjunction match operator; performs matching of e1 OR e2 and then keeps the maximum score. |
e1 MAX e2 |
MAX(s1,s2) |
design MAX conception |
9 |
e1 OR e2 |
Disjunction match |
e1 OR e2 |
s1+s2 |
design OR conception |
Priority 1 operators
The prefix handlers are treated as priority 1 operators. For example, Obama before:2009/01/01, searches for all documents relating to Obama before January 2009.
Priority 2 operators
The negation and optional operators are treated as priority 2.
Priority 3 operators
All proximity operators are treated as priority 3. "close enough" is defined by the default proximity distance in the parsing configuration of the query. The default proximity distance is 16 characters.
NOTE - The query operators operating on word positions (NEAR and NEXT) cannot be used to combine expressions whose “position” cannot be computed. For example, the query music NEAR (Madonna AND mp3) is illegal, because the expression Madonna AND mp3 cannot be associated with a single word position value.