OpenSearch/docs/reference/query-dsl/ids-query.asciidoc

27 lines
581 B
Plaintext
Raw Normal View History

[[query-dsl-ids-query]]
=== Ids Query
Returns documents based on their IDs. This query uses document IDs stored in
the <<mapping-id-field,`_id`>> field.
==== Example request
[source,js]
--------------------------------------------------
GET /_search
{
"query": {
"ids" : {
"values" : ["1", "4", "100"]
}
}
}
--------------------------------------------------
// CONSOLE
==== Top-level parameters for `ids`
[cols="v,v",options="header"]
|======
|Parameter |Description
|`values` |An array of <<mapping-id-field, document IDs>>.
|======