query

Prefix query

/ prefix, / query

Prefix query # Returns documents that contain a specific prefix in a provided field. Examples # The following search returns documents where the org.id field contains a term that begins with inf. GET /_search { "query": { "prefix": { "org.id": { "value": "inf" } } } } Top-level parameters for prefix # <field> (Required, object) Field you wish to search. Parameters for <field> # value ...

Range query

/ range, / query

Range query # Returns documents that contain terms within a provided range. Examples # The following search returns documents where the age field contains a term between 10 and 20. GET /_search { "query": { "range": { "age": { "gte": 10, "lte": 20 } } } } Top-level parameters for range # <field> (Required, object) Field you wish to search. Parameters for <field> # gt ...

Regexp query

/ regexp, / query

Regexp query # Returns documents that contain terms matching a regular expression. A regular expression is a way to match patterns in data using placeholder characters, called operators. For a list of operators supported by the regexp query, see Regular expression syntax. Examples # The following search returns documents where the org.id field contains any term that begins with in and ends with y. The .* operators match any characters of any length, including no characters. ...

Term query

/ term, / query

Term query # Returns documents that contain an exact term in a provided field. You can use the term query to find documents based on a precise value such as a price, a product ID, or a username. Examples # GET /_search { "query": { "term": { "org.id": { "value": "infini" } } } } Top-level parameters for term # <field> (Required, object) Field you wish to search. ...