I'm trying to do this:
with Spring Data Elasticsearch, but i can't find a way to make Unique Count aggregation by field value.
SearchQuery searchQuery = new NativeSearchQueryBuilder()
.withIndices("logs-processing-*")
.addAggregation(terms("procedure_code").field("procedure_code.keyword"))
.build();
现在无法进行测试,但可以肯定,您应该尝试:.addAggregation(terms(“ procedure_code”)。field(“ keyword”))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.