mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-14 16:12:11 +00:00
parent
68ba4cd39b
commit
b511756b2b
@ -23,6 +23,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.springframework.data.elasticsearch.core.AggregationsContainer;
|
import org.springframework.data.elasticsearch.core.AggregationsContainer;
|
||||||
|
import org.springframework.lang.Nullable;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,7 +67,11 @@ public class ElasticsearchAggregations implements AggregationsContainer<List<Ela
|
|||||||
* @param name the name of the aggregation
|
* @param name the name of the aggregation
|
||||||
* @return the aggregation or {@literal null} if not found
|
* @return the aggregation or {@literal null} if not found
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
public ElasticsearchAggregation get(String name) {
|
public ElasticsearchAggregation get(String name) {
|
||||||
|
|
||||||
|
Assert.notNull(name, "name must not be null");
|
||||||
|
|
||||||
return aggregationsAsMap.get(name);
|
return aggregationsAsMap.get(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user