2013-08-28 19:24:34 -04:00
|
|
|
[[query-dsl-ids-query]]
|
2015-05-05 02:27:52 -04:00
|
|
|
== Ids Query
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2015-05-05 02:27:52 -04:00
|
|
|
Filters documents that only have the provided ids. Note, this query
|
2015-04-30 18:01:35 -04:00
|
|
|
uses the <<mapping-uid-field,_uid>> field.
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"ids" : {
|
|
|
|
"type" : "my_type",
|
|
|
|
"values" : ["1", "4", "100"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
The `type` is optional and can be omitted, and can also accept an array
|
2015-04-30 18:01:35 -04:00
|
|
|
of values. If no type is specified, all types defined in the index mapping are tried.
|