1.range value type float
code:
GET /shops/baseShops/_search?_source=true&size=10
{"query":{"match_all":{}},"post_filter":{"bool":{"must":[[{"term":{"company_id":75}}],[{"term":{"manager_id":"3685"}}],[{"range":{"out_date":{"gte":1516291200.0,"lte":151698239.0}}}]]}},"sort":[{"created_at":"desc"}]}
result:
nothing
2.range value type int
code:
GET /shops/baseShops/_search?_source=true&size=10
{"query":{"match_all":{}},"post_filter":{"bool":{"must":[[{"term":{"company_id":75}}],[{"term":{"manager_id":"3685"}}],[{"range":{"out_date":{"gte":1516291200,"lte":151698239}}}]]}},"sort":[{"created_at":"desc"}]}
result:
three data
"out_date": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
this type is wrong,I am not statement field type,this type is first time save value type........
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.