问题
I am using libcurl to retrieve my indexed results from elastic search. I have problems with the following code. Meaning, it doesn't return any results. http://pastebin.com/NgdTBTAb
I tried its curl variation (below) with no success.
curl -XGET http://localhost:9202/_all/_search?pretty=true -d '{
"size": 1000000,
"query" : {
"range" : {
"snapshotTime" : {
"from" : "2012-10-31T13:00:00",
"to" : "2012-10-31T14:00:00"
}
}
}
}'
The same code with out "to" in the range query seems to work fine. Its curl version of the request retrieves all the results. http://pastebin.com/DYi10upZ
Is there something wrong with the way I am querying?
The expected result set (partial) is here. http://pastebin.com/xNLwZmqK
Thanks.
来源:https://stackoverflow.com/questions/13272414/elastic-search-json-range-query-issue-when-using-libcurl-curl