Aggregation date using RestHighLevelClient

I'm trying to implement sql below:
select format(date,'yyyy-MM-dd'), count(*) group by format(date,'yyyy-MM-dd')
using RestHighLevelClient
java code:

    SearchSourceBuilder sourceBuilder = new SearchSourceBuilder();
    sourceBuilder.query(QueryBuilders.matchAllQuery());
    sourceBuilder.aggregation(AggregationBuilders.terms("date_count").field("time").format("yyyy-MM-dd"));
    SearchRequest searchRequest = new SearchRequest("order_*");
    searchRequest.source(sourceBuilder);
    SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
    Aggregations aggregations = searchResponse.getAggregations();

I got the result but with many repeat date results as images shows below:

How should I avoid repeat date? I mean the same date(such as 2020-03-05) count as one row.

I've found my answer: