mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-15 00:22:11 +00:00
parent
c93039410a
commit
c4910bf399
@ -41,11 +41,10 @@ public class ElasticsearchAggregations implements AggregationsContainer<List<Ela
|
|||||||
|
|
||||||
Assert.notNull(aggregations, "aggregations must not be null");
|
Assert.notNull(aggregations, "aggregations must not be null");
|
||||||
|
|
||||||
Map<String, ElasticsearchAggregation> elasticsearchAggregationsAsMap = new HashMap<>(aggregations.size());
|
aggregationsAsMap = new HashMap<>();
|
||||||
aggregations.forEach((name, aggregate) -> elasticsearchAggregationsAsMap //
|
aggregations.forEach((name, aggregate) -> aggregationsAsMap //
|
||||||
.put(name, new ElasticsearchAggregation(new Aggregation(name, aggregate))));
|
.put(name, new ElasticsearchAggregation(new Aggregation(name, aggregate))));
|
||||||
|
|
||||||
this.aggregationsAsMap = elasticsearchAggregationsAsMap;
|
|
||||||
this.aggregations = new ArrayList<>(aggregationsAsMap.values());
|
this.aggregations = new ArrayList<>(aggregationsAsMap.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +62,7 @@ public class ElasticsearchAggregations implements AggregationsContainer<List<Ela
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the aggregation that is associated with the specified name.
|
* Returns the aggregation that is associated with the specified name.
|
||||||
*
|
*
|
||||||
* @param the name
|
* @param the name
|
||||||
* @return the aggregation
|
* @return the aggregation
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user