es 在用搜索时 抛503错误 类型:reduce_search_phase_exception

新手上路,请多包涵

在使用搜索API时报错,下面先贴上搜索表达式

搜索表达式:

{
    "size": 25,
    "from": 0,
    "query": {
        "bool": {
            "filter": [{
                "term": {
                    "is_display": "1"
                }
            }],
            "must": [{
                "multi_match": {
                    "query": "蒜头",
                    "fields": ["title", "keywords"],
                    "minimum_should_match": "50%"
                }
            }],
            "should": [{
                "match_phrase": {
                    "title": {
                        "query": "蒜头",
                        "slop": 1
                    }
                }
            }, {
                "match_phrase": {
                    "keywords": {
                        "query": "蒜头",
                        "slop": 2
                    }
                }
            }]
        }
    },
    "suggest": {
        "text": "蒜头",
        "kw-suggestion": {
            "term": {
                "field": "keywords",
                "max_edits": 2
            }
        }
    },
    "sort": {
        "_script": {
            "type": "number",
            "script": {
                "inline": "log1p(3 * doc['search_score_reference_value'].value)"
            },
            "order": "desc"
        }
    }
}

错误信息:

{
  "error": {
    "root_cause": [],
    "type": "reduce_search_phase_exception",
    "reason": "[reduce] ",
    "phase": "fetch",
    "grouped": true,
    "failed_shards": [],
    "caused_by": {
      "type": "illegal_state_exception",
      "reason": "Can't merge suggest result, this might be caused by suggest calls across multiple indices with different analysis chains. Suggest entries have different sizes actual [1] expected [3]"
    }
  },
  "status": 503
}

搜索不任何有用的结果

阅读 11k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进