ids-query.asciidoc 517 B

123456789101112131415161718
  1. [[query-dsl-ids-query]]
  2. === Ids Query
  3. Filters documents that only have the provided ids. Note, this query
  4. uses the <<mapping-uid-field,_uid>> field.
  5. [source,js]
  6. --------------------------------------------------
  7. {
  8. "ids" : {
  9. "type" : "my_type",
  10. "values" : ["1", "4", "100"]
  11. }
  12. }
  13. --------------------------------------------------
  14. The `type` is optional and can be omitted, and can also accept an array
  15. of values. If no type is specified, all types defined in the index mapping are tried.