2.2.12.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 Boolean expressions detailed following.

The protocol server MUST interpret a set of group aliases specified before the Boolean expression. These group aliases give the protocol client the capability to refer to a group of properties by a single identifier in the Boolean expression. The details of how to do this are specified in section 2.2.12.3.2.

 conditions      =      [group-aliases 1*ws] 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 four non full-text predicates:

  • LIKE predicate

  • Multi-value predicate

  • Literal predicate

  • NULL predicate

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