This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
IDs
editIDs
editReturns documents based on their IDs. This query uses document IDs stored in
the _id
field.
Example request
editresp = client.search( query={ "ids": { "values": [ "1", "4", "100" ] } }, ) print(resp)
response = client.search( body: { query: { ids: { values: [ '1', '4', '100' ] } } } ) puts response
const response = await client.search({ query: { ids: { values: ["1", "4", "100"], }, }, }); console.log(response);
GET /_search { "query": { "ids" : { "values" : ["1", "4", "100"] } } }
Top-level parameters for ids
edit-
values
- (Required, array of strings) An array of document IDs.