Match Phrase Prefix Query¶
A query that matches documents containing terms in the same order as those in the analyzed query string.
The final analyzed token is treated as a prefix and expanded to at most max_expansions
terms.
The expansion process searches the field’s sorted terms list, segment by segment, until enough terms with the prefix are found.
Proto definition:
// A query that matches documents containing terms in the same order as those in the analyzed query string. The final analyzed token is treated as a prefix.
message MatchPhrasePrefixQuery {
// Field in the document to query.
string field = 1;
// The text to query with.
string query = 2;
// Edit distance between respective positions of tokens generated by analyzing this query and the positions of terms in a document.
int32 slop = 3;
// Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
Analyzer analyzer = 4;
// Maximum number of terms to which the last provided term of the query value will expand. Defaults to 50.
int32 max_expansions = 5;
}