是否可以对术语查询使用模糊而不匹配?让我解释:
假设我们有 4 个文档
{ "index": { "_id": 1 }}
{ "text": "I play football!"}
{ "index": { "_id": 2 }}
{ "text": "I love playing"}
{ "index": { "_id": 3 }}
{ "text": "X is the best player"}
{ "index": { "_id": 4 }}
{ "text": "plyaer"}
使用时:
GET /index/my_type/_search
{
"query": {
"fuzzy": {
"value": "player",
"fuzziness": 1
}
}
}
我得到:
{ "index": { "_id": 3 }}
{ "text": "X is the best player"}
{ "index": { "_id": 4 }}
{ "text": "plyaer"}
但我只想要一个 plyaer 的结果,它对应于 fuzziness=1 的“精确”匹配(“术语”)