Ids Query

edit

Returns documents based on their IDs. This query uses document IDs stored in the _id field.

Example request

edit
GET /_search
{
    "query": {
        "ids" : {
            "type" : "_doc",
            "values" : ["1", "4", "100"]
        }
    }
}

Top-level parameters for ids

edit
values
An array of document IDs.