Search in sources :

Example 1 with ParsedFilters

use of 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();
}
Also used : List(java.util.List) ParsedFilters(org.elasticsearch.search.aggregations.bucket.filter.ParsedFilters)

Aggregations

List (java.util.List)1 ParsedFilters (org.elasticsearch.search.aggregations.bucket.filter.ParsedFilters)1