每个人。这是一个带有elasitcsearch 文档 url的简单测试代码
curl -XPOST 'localhost:9200/customer/external/_search?pretty'
{ "took" : 3, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 2, "max_score " : 1.0, "hits" : [ { "_index" : "customer", "_type" : "external", "_id" : "1", "_score" : 1.0, "_source":{"age":20 “余额”:100000,“名称”:“Thomas.St.Wang”} },{“_index”:“客户”,“_type”:“外部”,“_id”:“2”,“_score" : 1.0, "_source":{"age":19,"balance":10000,"name":"TSW"} } ] } }
以下请求不是我期望的结果。为什么。
curl -XPOST 'localhost:9200/customer/external/_search?pretty' -d
{
"query":{
"filtered":{
"query":{
"match_all":{
}
},
"filter":{
"range":{
"balance":{
"gte":9999,
"lte":100001
}
}
}
}
}
}
{ "took" : 2, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 0, "max_score " : null, "命中" : [ ] } }
我的查询有什么问题?谢谢。