ElasticSearch curl return nothing data

Hi
I stay trying to execute search by curl. When i execute this query on devtools in kibana i get this response:

{
"took" : 58,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 158196,
"max_score" : 1.0,

But when i pass to curl and execute on terminal the curl only return {"took":8,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}bash-4.2$

The curl is this:

curl -XGET "http://elasticsearch:9200/my_index/_search" -H 'Content-Type: application/json' -d'
{
"query": {
"range": {
"@timestamp": {
"gte": "2019-02-01",
"lte": "2019-03-01",
"format": "yyyy-MM-dd"
}
}
}
}'

What is wrong? Thanks for advanced.

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