elasticsearch使用multi_match, type为phrase查询nested类型字段时报错

这是索引信息

这是查询语句, spring data es生成的

{

"query": {

"bool": {

"must": [

{

"nested": {

"query": {

"multi_match": {

"query": "星火通讯",

"fields": [

"nameValues.entityName^1.0",

"nameValues.firstName^1.0",

"nameValues.originalScriptNames^1.0",

"nameValues.singleStringNames^1.0",

"nameValues.surname^1.0"

],

"type": "phrase",

"operator": "OR",

"slop": 0,

"prefix_length": 0,

"max_expansions": 50,

"zero_terms_query": "NONE",

"auto_generate_synonyms_phrase_query": true,

"fuzzy_transpositions": true,

"boost": 1

}

},

"path": "nameValues",

"ignore_unmapped": false,

"score_mode": "sum",

"boost": 1

}

}

],

"filter": [

{

"term": {

"whiteList": {

"value": -1,

"boost": 1

}

}

},

{

"term": {

"watchTypeCode": {

"value": 0,

"boost": 1

}

}

}

],

"adjust_pure_negative": true,

"boost": 1

}

}

}

然后就是报错了

但是不设置类型为phrase时就没有问题, 是phrase类型不支持嵌套查询还是什么呢

以上是 elasticsearch使用multi_match, type为phrase查询nested类型字段时报错 的全部内容, 来源链接: utcz.com/p/944189.html

回到顶部