【问题标题】:How to repair ElasticSearch broken query?如何修复 ElasticSearch 损坏的查询?
【发布时间】:2022-11-21 02:19:01
【问题描述】:

当我升级 SSL 时,我的 elasticsearch 已停止工作,不知道为什么?


      $params = [
                'index' => 'vf_dev',
                'size'   => $filter["limit"],
                'from'   => $filter["skip"],
                'body'  => [
                    'query' => [
                        'bool' =>
                            $search
                    ]
                ]
            ];

我的查询如上。我的错误如下所示。我错过了什么?

{"type":"x_content_parse_exception","re​​ason":"[1:93] [bool] 无法解析字段 [must]"}],"type":"x_content_parse_exception","re​​ason":"[1:93 ] [bool] 无法解析字段 [must]","caused_by":{"type":"illegal_state_exception","re​​ason":"无法在 1:93 获取 START_ARRAY 上的文本

【问题讨论】:

    标签: elasticsearch


    【解决方案1】:

    Tldr

    我相信,您的布尔查询模式是错误的。 根据 documentation 你应该有:

    • 过滤器
    • 必须
    • 应该
    • 绝不能

    我相信它不见了。

    【讨论】:

      猜你喜欢
      • 2019-08-02
      • 1970-01-01
      • 2011-09-04
      • 1970-01-01
      • 2010-09-25
      • 1970-01-01
      • 1970-01-01
      • 2010-11-23
      • 2011-01-19
      相关资源
      最近更新 更多