elasticsearch中highlight的“假匹配”
一个highlight的假高亮现象:
/index_name/_search?rest_total_hits_as_int=true
{
"_source": {
"includes": ["name","address"]
},
"query": {
"bool": {
"should": [
{
"match": {
"address": {
"query": "新疆蓝天七色建材有限公司",
"operator": "and"
}
}
}
]
}
},
"highlight": {
"fields": {
"name": {},
"address": {}
}
},
"from": 0,
"size": 10
}
返回结果:可以发现通过地址是没有匹配到任何结果
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 6,
"successful": 6,
"skipped": 0,
"failed":