Class ElasticsearchSearchPredicateFactoryImpl
- java.lang.Object
-
- org.hibernate.search.engine.search.predicate.dsl.spi.AbstractSearchPredicateFactory<ElasticsearchSearchPredicateFactory,ElasticsearchSearchPredicateIndexScope<?>>
-
- org.hibernate.search.backend.elasticsearch.search.predicate.dsl.impl.ElasticsearchSearchPredicateFactoryImpl
-
- All Implemented Interfaces:
ElasticsearchSearchPredicateFactory,ExtendedSearchPredicateFactory<ElasticsearchSearchPredicateFactory>,SearchPredicateFactory
public class ElasticsearchSearchPredicateFactoryImpl extends AbstractSearchPredicateFactory<ElasticsearchSearchPredicateFactory,ElasticsearchSearchPredicateIndexScope<?>> implements ElasticsearchSearchPredicateFactory
-
-
Field Summary
-
Fields inherited from class org.hibernate.search.engine.search.predicate.dsl.spi.AbstractSearchPredicateFactory
dslContext
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchSearchPredicateFactoryImpl(SearchPredicateDslContext<ElasticsearchSearchPredicateIndexScope<?>> dslContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PredicateFinalStepfromJson(com.google.gson.JsonObject jsonObject)Create a predicate from JSON.PredicateFinalStepfromJson(String jsonString)Create a predicate from JSON.ElasticsearchSearchPredicateFactorywithRoot(String objectFieldPath)Create a new predicate 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.predicate.dsl.spi.AbstractSearchPredicateFactory
and, and, and, bool, bool, exists, extension, extension, id, match, matchAll, matchNone, named, nested, nested, not, not, or, or, or, phrase, range, regexp, simpleQueryString, spatial, terms, toAbsolutePath, wildcard
-
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.predicate.dsl.SearchPredicateFactory
and, and, and, bool, bool, exists, extension, extension, id, match, matchAll, matchNone, named, nested, nested, not, not, or, or, or, phrase, range, regexp, simpleQueryString, spatial, terms, toAbsolutePath, wildcard
-
-
-
-
Constructor Detail
-
ElasticsearchSearchPredicateFactoryImpl
public ElasticsearchSearchPredicateFactoryImpl(SearchPredicateDslContext<ElasticsearchSearchPredicateIndexScope<?>> dslContext)
-
-
Method Detail
-
withRoot
public ElasticsearchSearchPredicateFactory withRoot(String objectFieldPath)
Description copied from interface:SearchPredicateFactoryCreate a new predicate factory whose root for all paths passed to the DSL will be the given object field.This is used to call reusable methods that apply the same predicate on different object fields that have same structure (same sub-fields).
- Specified by:
withRootin interfaceExtendedSearchPredicateFactory<ElasticsearchSearchPredicateFactory>- Specified by:
withRootin interfaceSearchPredicateFactory- Parameters:
objectFieldPath- The path from the current root to an object field that will become the new root.- Returns:
- A new predicate factory using the given object field as root.
-
fromJson
public PredicateFinalStep fromJson(String jsonString)
Description copied from interface:ElasticsearchSearchPredicateFactoryCreate a predicate from JSON.- Specified by:
fromJsonin interfaceElasticsearchSearchPredicateFactory- Parameters:
jsonString- A JSON-formatted string representing an Elasticsearch query. The JSON object must be a syntactically correct Elasticsearch query. See the Elasticsearch documentation.- Returns:
- The final step of the predicate DSL.
-
fromJson
public PredicateFinalStep fromJson(com.google.gson.JsonObject jsonObject)
Description copied from interface:ElasticsearchSearchPredicateFactoryCreate a predicate from JSON.- Specified by:
fromJsonin interfaceElasticsearchSearchPredicateFactory- Parameters:
jsonObject- AJsonObjectrepresenting an Elasticsearch query. The JSON object must be a syntactically correct Elasticsearch query. See the Elasticsearch documentation.- Returns:
- The final step of the predicate DSL.
-
-