Problems with elastic search querying when using libcurl

(Dinesh Sriram) #1

Hello All,
I am using libcurl to retrieve my indexed results. I have problems
with the following code.

The same code with out "to" in the range query seems to work fine. [code
I tried its curl variation (below) and it seemed to retrieve all the

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"

Is there something wrong with the way I am querying?
In case if there is a better library (C/C++) that suits elastic search
needs, do let me know.


(Dinesh Sriram) #2

By problems in the first code, I mean, I don't get any results back. The
total_hits remain 0. However, its curl version works fine retrieving all
the results.


(system) #3