ids-query.asciidoc 523 B

1234567891011121314151617181920
  1. [[query-dsl-ids-query]]
  2. == Ids Query
  3. Filters documents that only have the provided ids. Note, this query
  4. does not require the <<mapping-id-field,_id>>
  5. field to be indexed since it works using the
  6. <<mapping-uid-field,_uid>> field.
  7. [source,js]
  8. --------------------------------------------------
  9. {
  10. "ids" : {
  11. "type" : "my_type",
  12. "values" : ["1", "4", "100"]
  13. }
  14. }
  15. --------------------------------------------------
  16. The `type` is optional and can be omitted, and can also accept an array
  17. of values.