我已经使用以下设置配置了我的索引,并且 matchAll 查询结果在字段 IPRANGE 中具有值“试用”。
设置:
{
"settings" : {
"analysis": {
"filter": {
"autocomplete_filter": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 5
}
},
"analyzer": {
"autocomplete": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"autocomplete_filter"
]
}
}
}
},
"mappings" : {
"users" : {
"properties" : {
"IPRANGE" : {
"type" : "string",
"analyzer" : "autocomplete"
}
}
}
},
refresh_interval: "1000"
}
但是当我使用以下有效负载进行搜索时,它不会返回结果,即 0 次命中。
网址:
http://xxxxxx:9200/db2/users/_search
有效载荷:
{
"query": {
"match": {
"IPRANGE": "tr"
}
}
}
可能是什么问题?