phrase

fun phrase(terms: List<String>, field: String = "_all"): SearchQuery

A Phrase query

Searches for the terms in the same order and position, without analyzing them.

The target field must be indexed with "include term vectors".

NOTE: This is a non-analytic query, meaning it won’t perform any text analysis on the query text.

Similar queries

If you want to analyze the terms for linguistic similarity, use matchPhrase.

To search for a single term without analysis, use term

Parameters

terms

The input terms to search for in, the same order and position.

field

The field to search. Defaults to _all, whose content is specified during index creation.