Skip to content

Search API

ignacio-alorre edited this page May 23, 2019 · 6 revisions

The search API allows you to execute a search query and get back search hits that match the query. The query can either be provided using a simple query string as a parameter, or using a request body.

Request Body Search

The search request can be executed with a search DSL, which includes the Query DSL, within its body. Here is an example:

GET /twitter/tweet/_search
{
    "query" : {
        "term" : { "user" : "kimchy" }
    }
}

Source: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-search.html#search-multi-index-type

Clone this wiki locally