跳到正文
本页尚未翻译成中文,以下为英文原文。 查看英文版

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:

json
GET shakespeare/_search
{
  "query": {
    "ids": {
      "values": [
        34229,
        91296
      ]
    }
  }
}

Parameters ​

The query accepts the following parameter.

ParameterData typeDescription
valuesArray of stringsThe document IDs to search for. Required.