Class ElasticsearchSearchAggregationFactoryImpl
- java.lang.Object
-
- org.hibernate.search.engine.search.aggregation.dsl.spi.AbstractSearchAggregationFactory<ElasticsearchSearchAggregationFactory,ElasticsearchSearchAggregationIndexScope<?>,ElasticsearchSearchPredicateFactory>
-
- org.hibernate.search.backend.elasticsearch.search.aggregation.dsl.impl.ElasticsearchSearchAggregationFactoryImpl
-
- All Implemented Interfaces:
ElasticsearchSearchAggregationFactory,ExtendedSearchAggregationFactory<ElasticsearchSearchAggregationFactory,ElasticsearchSearchPredicateFactory>,SearchAggregationFactory
public class ElasticsearchSearchAggregationFactoryImpl extends AbstractSearchAggregationFactory<ElasticsearchSearchAggregationFactory,ElasticsearchSearchAggregationIndexScope<?>,ElasticsearchSearchPredicateFactory> implements ElasticsearchSearchAggregationFactory
-
-
Field Summary
-
Fields inherited from class org.hibernate.search.engine.search.aggregation.dsl.spi.AbstractSearchAggregationFactory
dslContext
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchSearchAggregationFactoryImpl(SearchAggregationDslContext<ElasticsearchSearchAggregationIndexScope<?>,ElasticsearchSearchPredicateFactory> dslContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AggregationFinalStep<com.google.gson.JsonObject>fromJson(com.google.gson.JsonObject jsonObject)Create an aggregation from JSON.AggregationFinalStep<com.google.gson.JsonObject>fromJson(String jsonString)Create an aggregation from JSON.ElasticsearchSearchAggregationFactorywithRoot(String objectFieldPath)Create a new aggregation factory whose root for all paths passed to the DSL will be the given object field.-
Methods inherited from class org.hibernate.search.engine.search.aggregation.dsl.spi.AbstractSearchAggregationFactory
extension, range, terms, toAbsolutePath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.search.aggregation.dsl.ExtendedSearchAggregationFactory
range, terms
-
Methods inherited from interface org.hibernate.search.engine.search.aggregation.dsl.SearchAggregationFactory
extension, toAbsolutePath
-
-
-
-
Constructor Detail
-
ElasticsearchSearchAggregationFactoryImpl
public ElasticsearchSearchAggregationFactoryImpl(SearchAggregationDslContext<ElasticsearchSearchAggregationIndexScope<?>,ElasticsearchSearchPredicateFactory> dslContext)
-
-
Method Detail
-
withRoot
public ElasticsearchSearchAggregationFactory withRoot(String objectFieldPath)
Description copied from interface:SearchAggregationFactoryCreate a new aggregation factory whose root for all paths passed to the DSL will be the given object field.See here for more information.
- Specified by:
withRootin interfaceExtendedSearchAggregationFactory<ElasticsearchSearchAggregationFactory,ElasticsearchSearchPredicateFactory>- Specified by:
withRootin interfaceSearchAggregationFactory- Parameters:
objectFieldPath- The path from the current root to an object field that will become the new root.- Returns:
- A new aggregation factory using the given object field as root.
-
fromJson
public AggregationFinalStep<com.google.gson.JsonObject> fromJson(com.google.gson.JsonObject jsonObject)
Description copied from interface:ElasticsearchSearchAggregationFactoryCreate an aggregation from JSON.The created aggregation will return the result as a
JsonObject.- Specified by:
fromJsonin interfaceElasticsearchSearchAggregationFactory- Parameters:
jsonObject- AJsonObjectrepresenting an Elasticsearch aggregation. The JSON object must be a syntactically correct Elasticsearch aggregation. See the Elasticsearch documentation.- Returns:
- The final step of the aggregation DSL.
-
fromJson
public AggregationFinalStep<com.google.gson.JsonObject> fromJson(String jsonString)
Description copied from interface:ElasticsearchSearchAggregationFactoryCreate an aggregation from JSON.The created aggregation will return the result as a
JsonObject.- Specified by:
fromJsonin interfaceElasticsearchSearchAggregationFactory- Parameters:
jsonString- A JSON-formatted string representing an Elasticsearch aggregation. The JSON object must be a syntactically correct Elasticsearch aggregation. See the Elasticsearch documentation.- Returns:
- The final step of the aggregation DSL.
-
-