'match' Clause

The 'match' clause allows you to match values such as text, dates, numerical and Boolean values.

This query is the standard query for full text search.

Example 1-

{
  "query": {
    "bool": {
      "match": {
          "query": "free text for search" 
        }
    }
  }
}

In the above example, the text "free text for search" will be stemmed and parsed, and the resulting keywords will be matched with documents.

Example 2-

{
  "query": {
    "bool": {
      "match": {
          "species": "Asian Koel" 
        }
    }
  }
}

In the above example, documents with the field "species" and the value "Asian Koel" under this field will be returned. The text "Asian Koel" will not be stemmed nor normalized.

Last updated