IDs query
Use the ids
query to search for documents with one or more specific document ID values in the _id
field. For example, the following query requests documents with the IDs 34229
and 91296
:
GET shakespeare/_search
{
"query": {
"ids": {
"values": [
34229,
91296
]
}
}
}
copy
Parameters
The query accepts the following parameter.
Parameter | Data type | Description |
---|---|---|
values | Array of strings | The document IDs to search for. Required. |
当前内容版权归 OpenSearch 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 OpenSearch .