Идентификаторы (IDs)
Возвращает документы на основе их идентификаторов. Этот запрос использует идентификаторы документов, хранящиеся в поле _id.
Пример запроса
resp = 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"]
}
}
} Параметры верхнего уровня для ids
-
values - (Обязательно, массив строк) Массив идентификаторов документов.
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/query-dsl-ids-query.html