mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-13 23:52:10 +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");
|
||||
|
||||
Map<String, ElasticsearchAggregation> elasticsearchAggregationsAsMap = new HashMap<>(aggregations.size());
|
||||
aggregations.forEach((name, aggregate) -> elasticsearchAggregationsAsMap //
|
||||
aggregationsAsMap = new HashMap<>();
|
||||
aggregations.forEach((name, aggregate) -> aggregationsAsMap //
|
||||
.put(name, new ElasticsearchAggregation(new Aggregation(name, aggregate))));
|
||||
|
||||
this.aggregationsAsMap = elasticsearchAggregationsAsMap;
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @param the name
|
||||
* @return the aggregation
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user