在使用搜索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
}
搜索不任何有用的结果
我也遇到了,偶尔503,暂时没找到原因