Basic Usage

regex_phrase matches a specific sequence of regex queries. It is similar to phrase but allows for more flexibility in the query.

field
required

Specifies the field within the document to search for the term.

regexes
required

An ARRAY of regex queries that the search is looking to match.

slop
default: 0

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.

max_expansions

Limits the number of term variations that the prefix can expand to during the search. This helps in controlling the breadth of the search by setting a cap on how many different terms the prefix can match.

Setting slop equal to n allows n terms to come in between the terms in the phrase.

Was this page helpful?