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
ConstructorsConstructorDescriptionElasticsearchSearchAggregationFactoryImpl(SearchAggregationDslContext<ElasticsearchSearchAggregationIndexScope<?>, ElasticsearchSearchPredicateFactory> dslContext) -
Method Summary
Modifier and TypeMethodDescriptionAggregationFinalStep<com.google.gson.JsonObject>fromJson(com.google.gson.JsonObject jsonObject) Create an aggregation from JSON.AggregationFinalStep<com.google.gson.JsonObject>Create an aggregation from JSON.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, withParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.engine.search.aggregation.dsl.ExtendedSearchAggregationFactory
range, termsMethods inherited from interface org.hibernate.search.engine.search.aggregation.dsl.SearchAggregationFactory
extension, toAbsolutePath, withParameters
-
Constructor Details
-
ElasticsearchSearchAggregationFactoryImpl
public ElasticsearchSearchAggregationFactoryImpl(SearchAggregationDslContext<ElasticsearchSearchAggregationIndexScope<?>, ElasticsearchSearchPredicateFactory> dslContext)
-
-
Method Details
-
withRoot
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
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.
-