Phrase-Level Queries
Phrase
Basic Usage
Searches for documents containing a phrase.
The field must be indexed with a record of position
.
Specifies the field within the document to search for the term.
An ARRAY
of words that form the search phrase. These words must appear in
the specified order within the document for a match to occur, although some
flexibility is allowed based on the slop
parameter.
A slop of 0
requires the terms to appear exactly as they are in the phrase
and adjacent to each other. Higher slop values allow for more distance between
the terms.
Setting slop equal to n
allows n
terms to come in between the terms in the phrase.
Was this page helpful?