关于Elasticsearch Query中的Query DSL问题
老师,为什么我搜索name的值为大写开头的时候,返回的是这样的结果呢?
GET accounts/person/_search
{
"query": {
"term": {
"name": {
"value": "John"
}
}
}
}{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}把name的值改成小写开头的时候就能正确返回结果。