2013-08-29 01:24:34 +02:00
|
|
|
[[query-dsl-ids-query]]
|
2015-06-04 01:59:22 +02:00
|
|
|
=== Ids Query
|
2013-08-29 01:24:34 +02:00
|
|
|
|
2015-05-05 08:27:52 +02:00
|
|
|
Filters documents that only have the provided ids. Note, this query
|
2018-04-11 09:41:37 +02:00
|
|
|
uses the <<mapping-id-field,_id>> field.
|
2013-08-29 01:24:34 +02:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2016-05-24 11:58:43 +02:00
|
|
|
GET /_search
|
2013-08-29 01:24:34 +02:00
|
|
|
{
|
2016-05-24 11:58:43 +02:00
|
|
|
"query": {
|
|
|
|
"ids" : {
|
|
|
|
"values" : ["1", "4", "100"]
|
|
|
|
}
|
2013-08-29 01:24:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
2016-05-24 11:58:43 +02:00
|
|
|
// CONSOLE
|