Getting doc_count as zero while aggregation query on index created with type LocalDate in jpa

Getting doc_count as zero while aggregation query on index created with type LocalDate in jpa java. Format is "yyyy-mm-dd". Whatever I try looking here and there as help , doc_count is coming 0. Olease help
Below is query:

{
"aggs": {
"dateaggregationrange": {
"date_range": {
"field": "dateAggregation.keyword",
"ranges": [
{
"from": "2010-09-25",
"to": "2020-09-25"
}
]
}
}
}
}

Please provide a fully reproducible example that contains the exact HTTP calls to create the index plus mapping (especially for the date field), some sample documentsas well as the full query, so that others can reproduce your problem.

Also specifying your elastic stack version would help a lot. See also https://www.elastic.co/help

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