2.2.12.3.1.1 CONTAINS Predicate

The CONTAINS predicate, in its most basic form, MUST be true if a specified full-text searchable property contains a given token, and MUST be false otherwise. In particular, it MUST be false if the given property is not a full-text searchable property. It MUST support a number of special features, such as searching over all properties instead of only one, prefix matching, matching of inflectional forms of tokens, matching of a token in proximity to another token and matching of administrator-defined thesaurus terms. It MUST also support Boolean combinations of these features.

The basic format of the CONTAINS predicate is as follows:

 …CONTAINS(contains_property, contains_condition, language)…

The contains_property component MUST be one of the following:

Both "*" and "ALL" represent all full-text searchable properties that are crawled for a given item. If the property specified is not a text property, the results of the search query are undefined. If the contains_property component is not specified, the protocol server MUST use a default of Content.

The optional "language" component specifies the language that the protocol server evaluates the contains_condition component in. If no language is specified, the protocol server MUST revert to a reasonable default, such as the default language of the underlying operating system.

 contains-predicate      =      "CONTAINS" *ws "(" *ws [contains-property *ws "," *ws] "'" contains-condition "'" *ws ["," *ws lcid *ws] ")"
 contains-property      =      identifier / "*" / "ALL"

The contains_condition component MUST be either a single token, or an expression that specifies what to match in more detail.

 contains-condition      =      contains-token / contains-expression
 contains-token      =      *ws 1*alphanum *ws