MATCHES Operator

Selects documents by matching the character string you specify with values stored in a specific document field. When you use the MATCHES operator, you specify the field name to search, and the word, phrase, or number to search for.

Unlike the CONTAINS operator, the search criteria you specify with a MATCHES operator must match the field value exactly for a document to be selected. With the MATCHES operator, any occurrence of a search string that appears as a portion of a value is not selected; only values matching the entire search string are selected.

You can use question marks (?) to represent individual variable characters within a string, and asterisks (*) to match multiple variable characters within a string.

Use MATCHES with the FILTER operator. The example in "Sample Topic Outlines" shows how MATCHES might be used with the phrase "famous painters" and the TITLE field. The example assumes that the field TITLE has been created for the collection.