You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the count API with date range queries that contain now (e.g. [* TO now-1d]), the parsed query contains a negative number that leads to count 0 being returned. The following curl reproduction shows the different result obtained using the search API and the count API.
curl -XPUT localhost:9200/index1/type1/1 -d '{
"date": "2013-09-03T15:07:47.000Z"
}
'
curl -XPOST localhost:9200/index1/_refresh
#one hit gets returned using search api
curl -XGET localhost:9200/index1/_search -d '
{
"query" : {
"query_string": {
"query": "date:[* TO now-1d]"
}
}
}
'
#count 0 using count api
curl -XGET localhost:9200/index1/_count -d '
{
"query_string": {
"query": "date:[* TO now-1d]"
}
}
'
The text was updated successfully, but these errors were encountered:
When using the count API with date range queries that contain
now
(e.g.[* TO now-1d]
), the parsed query contains a negative number that leads to count 0 being returned. The following curl reproduction shows the different result obtained using the search API and the count API.The text was updated successfully, but these errors were encountered: