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.

Inside a nested query: supported — the value is matched per array element. On text fields prefer match; term targets exact keyword / numeric / date values.

Examples #

GET /_search
{
  "query": {
    "term": {
      "field": "org.id",
      "value": "infini"
    }
  }
}

Parameters for term #

  • field
    (Required, string) Field you wish to search.
  • value
    (Required, string) Term you wish to find in the provided field. To return a document, the term must exactly match the field value, including whitespace and capitalization.
  • case_insensitive
    (Optional, boolean) Allows ASCII case insensitive matching of the value with the indexed field values when set to true. Default is false.
  • boost
    (Optional, float, default: 1.0) Decrease or increase the relevance scores of the query.
Calendar September 27, 2026
Edit Edit this page