Elastic search json range query issue when using libcurl/curl

不问归期 提交于 2019-12-11 05:18:58

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!