use of org.graylog.shaded.elasticsearch7.org.elasticsearch.search.aggregations.bucket.filter.ParsedFilters in project sonarqube by SonarSource.
the class ComponentIndex method aggregationsToQualifiers.
private static ComponentIndexResults aggregationsToQualifiers(SearchResponse response) {
ParsedFilters filtersAgg = response.getAggregations().get(FILTERS_AGGREGATION_NAME);
List<ParsedFilters.ParsedBucket> buckets = (List<ParsedFilters.ParsedBucket>) filtersAgg.getBuckets();
return ComponentIndexResults.newBuilder().setQualifiers(buckets.stream().map(ComponentIndex::bucketToQualifier)).build();
}
Aggregations