【发布时间】:2021-07-10 09:50:38
【问题描述】:
我正在使用以下匹配查询搜索弹性搜索,这并没有给我完全匹配,而是给我一些更不重要的匹配。
我正在使用弹性搜索 6.3
请在下面找到我的查询
GET /_search
{
"must":{
"query_string":{
"query":"review:*test product*"
}
}
}
搜索结果:
“命中”:[{“_index”:“67107104”,“_type”:“_doc”,“_id”:“1”,“_score”:0.6931471,“_source”:{“title”:“测试" } }, { "_index": "67107104", "_type": "_doc", "_id": "2", "_score": 0.6931471, "_source": { "title": "product good" } } ,{“_index”:“67107104”,“_type”:“_doc”,“_id”:“3”,“_score”:0.6931471,“_source”:{“title”:“sample”}},{“_index ": "67107104", "_type": "_doc", "_id": "4", "_score": 0.7897571, "_source": { "title": "superr" } } ]
预期的搜索结果:
“命中”:[{“_index”:“67107104”,“_type”:“_doc”,“_id”:“1”,“_score”:0.6931471,“_source”:{“title”:“测试" } }, { "_index": "67107104", "_type": "_doc", "_id": "2", "_score": 0.6931471, "_source": { "title": "product good" } } ]
【问题讨论】:
标签: elasticsearch match query-string match-phrase