• 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]# 
    

      

  • 相关阅读:
    [贪心]P1049 装箱问题
    js中字符串转换为日期和比较大小
    weblogic配置数据源出错
    myeclipse安装svn插件的多种方式
    使用令牌实现防重复提交
    struts1.3异常处理机制
    spring log4j.properties
    spring jdbc.property的配置与使用
    js循环array,json,map
    java web的一些特殊用法(一)
  • 原文地址:https://www.cnblogs.com/rsapaper/p/8615456.html
Copyright © 2020-2023  润新知