elasticsearch 从Elastich搜索中获取第10001个文档?,elasticsearch,elasticsearch" /> elasticsearch 从Elastich搜索中获取第10001个文档?,elasticsearch,elasticsearch" />

elasticsearch 从Elastich搜索中获取第10001个文档?

elasticsearch 从Elastich搜索中获取第10001个文档?,elasticsearch,elasticsearch,我想从Elastic Search中获取第10001个文档 如何克服10k批量限制 给出此错误: { "error" : { "root_cause" : [ { "type" : "query_phase_execution_exception", "reason" : "Result window is too large, from + size must be less than or equal to: [10000] but

我想从Elastic Search中获取第10001个文档

如何克服10k批量限制

给出此错误:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "query_phase_execution_exception",
        "reason" : "Result window is too large, from + size must be less than or equal to: [10000] but was [10001]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."
      }
    ],
    "type" : "search_phase_execution_exception",
    "reason" : "all shards failed",
    "phase" : "query",
    "grouped" : true,
    "failed_shards" : [
      {
        "shard" : 0,
        "index" : ".kibana",
        "node" : "UWl8qQL8QomaoALoHI3BUw",
        "reason" : {
          "type" : "query_phase_execution_exception",
          "reason" : "Result window is too large, from + size must be less than or equal to: [10000] but was [10001]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."
        }
      }
    ],
    "caused_by" : {
      "type" : "query_phase_execution_exception",
      "reason" : "Result window is too large, from + size must be less than or equal to: [10000] but was [10001]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."
    }
  },
  "status" : 500
}

如果要获取超过10k个文档,则必须使用Scroll API


让我们知道您的文档是否有Id。如果有Id,您可以根据Id轻松搜索文档

就这样说吧

GET example/test/_search
{
"query":
{
"match":{
"_id":10001
}
}
}

希望这可能会有帮助

这个答案应该会有帮助:我只需要一个文档,但需要跳过第一个10k文档。Guneysus,你有文档ID吗?你怎么知道你想要第1001个?