Strange query sentence(can pass in Kibana but failed when Unmarshal)

hi all:
i have a sentence to query a group of users by terms (keyword field present uid) and with a range limit (long filed present unixtime ),the sentence can be executed in Kibana and curl, but when I use golang client(https://github.com/olivere/elastic) to perform the query, after json. Unmarshal(), the sentence is tampered,the range request is abandoned, why? my sentence disobey the json's rule?

mapping:
"index" : {
"type": {
"uid":{
"type":"keyword"
},
"unixtime":{
"type":"long"
}
}
}
sentence in Kibana:
GET /index/type/_search?pretty
{
"query" : {
"constant_score" : {
"filter" : {
"bool" : {
"filter" : {
"range" : {
"time" : { "gte" : 1, "lte" : 1234321 }
}
},
"filter" : {
"terms" : {
"uid" : ["18888", "678","8888","654"]
}
}
}
}
}
}
}

sentence in golang program (before Unmarshal, it's right):
{"constant_score" : {"filter" : {"bool" : {"filter" : {"range" : {"time" : {"gte" : 1, "lte" : 1234321}}}, "filter" : {"terms" : {"uid" : ["18888", "678","8888","654"]}}}}}}

sentence in golang program(after Unmarshal, range clause disappeared ... ):
map[constant_score:map[filter:map[bool:map[filter:map[terms:map[uid:[18888 678 8888 654]]]]]]]

waiting answers ...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.