29 lines
608 B
Plaintext
29 lines
608 B
Plaintext
[[query-dsl-ids-query]]
|
|
=== IDs
|
|
++++
|
|
<titleabbrev>IDs</titleabbrev>
|
|
++++
|
|
|
|
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
|
|
|
|
[[ids-query-top-level-parameters]]
|
|
==== Top-level parameters for `ids`
|
|
|
|
`values`::
|
|
(Required, array of strings) An array of <<mapping-id-field, document IDs>>. |