A text query is used to match some text (i.e. a search phrase possibly
consisting of multiple terms) against one or multiple fields. In case
multiple fields are provided, the phrase conceptually forms a logical OR
over the fields. In this case, the terms of the phrase basically have to
match within the text, that would result in concatenating all given
fields.
Example: (coupon_id contains
"xmas" )
query: {
text_query: {
fields: ["coupon_id"],
search_phrase: "xmas"
}
}
Example: (coupon_id contains "xmas" OR description contains
"xmas")
query: {
text_query: {
fields: ["description", "coupon_id"],
search_phrase: "xmas"
}
}
Example: (description contains "holiday" AND description
contains "bojo")
query: {
text_query: {
fields: ["description"],
search_phrase: "holiday bogo"
}
}
Property |
Type |
Constraints |
Description |
fields |
[String] |
itemNullable=false, mandatory=true, minItems=1,
nullable=false |
The document fields the search phrase has to match
against. |
search_phrase |
String |
mandatory=true, nullable=false |
A search phrase, which may consist of multiple
terms. |
X
Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. By continuing to use this site you are giving us your consent to do this.