zoukankan      html  css  js  c++  java
  • elasticsearch 布尔过滤器 游标查询 Scroll

    组合过滤器 | Elasticsearch: 权威指南 | Elastic https://www.elastic.co/guide/cn/elasticsearch/guide/current/combining-filters.html

    这种情况下,我们需要 bool (布尔)过滤器。 这是个 复合过滤器(compound filter) ,它可以接受多个其他过滤器作为参数,并将这些过滤器结合成各式各样的布尔(逻辑)组合。

    布尔过滤器

    一个 bool 过滤器由三部分组成:

    {
    "bool" : {
    "must" : [],
    "should" : [],
    "must_not" : [],
    }
    }
    must
    所有的语句都 必须(must) 匹配,与 AND 等价。
    must_not
    所有的语句都 不能(must not) 匹配,与 NOT 等价。
    should
    至少有一个语句要匹配,与 OR 等价。

    游标查询 Scroll | Elasticsearch: 权威指南 | Elastic https://www.elastic.co/guide/cn/elasticsearch/guide/current/scroll.html

    [root@hadoop3 xiaole_chk_url]# curl hadoop3:9200/direct_vote/kwaddress/_search?pretty=true -d "{"_source":false,"from":204500,"size":100}"
    {
      "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 [204600]. 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 parameter."
        } ],
        "type" : "search_phase_execution_exception",
        "reason" : "all shards failed",
        "phase" : "query",
        "grouped" : true,
        "failed_shards" : [ {
          "shard" : 0,
          "index" : "direct_vote",
          "node" : "fIuqvDKQTgW2xLMofruOkA",
          "reason" : {
            "type" : "query_phase_execution_exception",
            "reason" : "Result window is too large, from + size must be less than or equal to: [10000] but was [204600]. 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 parameter."
          }
        } ]
      },
      "status" : 500
    }
    [root@hadoop3 xiaole_chk_url]# 
    

      

  • 相关阅读:
    [CSS] prefers-reduced-motion
    [VSCode] Adding Custom Syntax Highlighting to a Theme in VSCode
    Subversion/Git/ReviewBoard工作流程
    oracle hints
    Node.js学习(10)----文件系统fs
    网络子系统41_inet_peer平衡二叉树的删除
    由链表初始化看C语言的二级指针
    挣值管理不是搞数字游戏(4)——让挣值管理实用!
    关于数据库一致改关闭下redo日志文件丢失的处理办法的总结
    Android 操作系统的内存回收机制
  • 原文地址:https://www.cnblogs.com/rsapaper/p/8615456.html
Copyright © 2011-2022 走看看