2.2.13.3.1 Conditions in the SELECT Statement

The conditions component of the SELECT statement specify which items to include in the search results. In detail, it specifies a Boolean expression that is evaluated for every item. If the expression is true, the protocol server MUST include the item in the list of search results. If the expression is false, the protocol server MUST NOT include the item in the list of search results. The protocol server MUST correctly interpret Boolean expressions that consist of other Boolean expressions joined by the operators AND and OR. The protocol server MUST allow an expression to be negated by using the NOT operator. There is an ordering of priority in which those Boolean operators are evaluated. The NOT operator has the highest priority, followed by the AND, and then the OR operators. It is possible to override evaluation priority by enclosing an expression that needs to be evaluated first in parenthesis. Finally, the protocol server MUST interpret expressions that consist of one of the following Boolean expressions.

 conditions             =   predicate
 predicate              =   predicate 1*ws "AND" 1*ws predicate
 predicate              =/  predicate 1*ws "OR" 1*ws predicate
 predicate              =/  "NOT" 1*ws predicate
 predicate              =/  "(" *ws predicate *ws ")"

An implementation of the SharePoint Search SQL syntax MUST support the following two types of predicates:

It MUST support the following two types of full-text predicates:

It MUST also support the following three non full-text predicates:

  • LIKE predicate

  • Literal predicate

  • NULL predicate.

     predicate              =/  ft-predicate / non-ft-predicate
     ft-predicate           =   contains-predicate / freetext-predicate
     non-ft-predicate       = like-predicate / literal-predicate / null-predicate