Skip to content

Commit

Permalink
Replace deprecated aggregation order key '_term' with '_key'
Browse files Browse the repository at this point in the history
  • Loading branch information
solth committed Oct 19, 2021
1 parent aed839d commit 1b56169
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ protected List<String> findDistinctValues(QueryBuilder query, String field, bool
List<String> distinctValues = new ArrayList<>();
try {
TermsAggregationBuilder termsAggregation = AggregationBuilders.terms(field).field(field)
.order(BucketOrder.aggregation("_term", sort));
.order(BucketOrder.aggregation("_key", sort));
if (size > 0) {
termsAggregation.size(Math.toIntExact(size));
}
Expand Down

0 comments on commit 1b56169

Please sign in to comment.