IDs
Returns documents based on their IDs. This query uses document IDs stored in the _id field.
Example request
GET /_search
{
"query": {
"ids" : {
"values" : ["1", "4", "100"]
}
}
} Top-level parameters for ids
-
values - (Required, array of strings) An array of document IDs.
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/query-dsl-ids-query.html