Skip to content

Commit

Permalink
Merge pull request kitodo#4768 from effective-webwork/es-deprecation-…
Browse files Browse the repository at this point in the history
…warning

Replace deprecated aggregation order key '_term' with '_key'
  • Loading branch information
Kathrin-Huber authored Nov 15, 2021
2 parents 0675697 + 1b56169 commit 918600e
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 918600e

Please sign in to comment.