Class ElasticsearchSearchSortFactoryImpl
- java.lang.Object
-
- org.hibernate.search.engine.search.sort.dsl.spi.AbstractSearchSortFactory<ElasticsearchSearchSortFactory,ElasticsearchSearchSortIndexScope<?>,ElasticsearchSearchPredicateFactory>
-
- org.hibernate.search.backend.elasticsearch.search.sort.dsl.impl.ElasticsearchSearchSortFactoryImpl
-
- All Implemented Interfaces:
ElasticsearchSearchSortFactory,ExtendedSearchSortFactory<ElasticsearchSearchSortFactory,ElasticsearchSearchPredicateFactory>,SearchSortFactory
public class ElasticsearchSearchSortFactoryImpl extends AbstractSearchSortFactory<ElasticsearchSearchSortFactory,ElasticsearchSearchSortIndexScope<?>,ElasticsearchSearchPredicateFactory> implements ElasticsearchSearchSortFactory
-
-
Field Summary
-
Fields inherited from class org.hibernate.search.engine.search.sort.dsl.spi.AbstractSearchSortFactory
dslContext
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchSearchSortFactoryImpl(SearchSortDslContext<ElasticsearchSearchSortIndexScope<?>,ElasticsearchSearchPredicateFactory> dslContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortThenStepfromJson(com.google.gson.JsonObject jsonObject)Order elements according to a JSON sort definition.SortThenStepfromJson(String jsonString)Order elements according to a JSON sort definition.ElasticsearchSearchSortFactorywithRoot(String objectFieldPath)Create a new sort 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.sort.dsl.spi.AbstractSearchSortFactory
composite, composite, distance, extension, extension, field, indexOrder, score, staticThenStep, 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.sort.dsl.ExtendedSearchSortFactory
distance, distance, field
-
Methods inherited from interface org.hibernate.search.engine.search.sort.dsl.SearchSortFactory
composite, composite, extension, extension, indexOrder, score, toAbsolutePath
-
-
-
-
Constructor Detail
-
ElasticsearchSearchSortFactoryImpl
public ElasticsearchSearchSortFactoryImpl(SearchSortDslContext<ElasticsearchSearchSortIndexScope<?>,ElasticsearchSearchPredicateFactory> dslContext)
-
-
Method Detail
-
withRoot
public ElasticsearchSearchSortFactory withRoot(String objectFieldPath)
Description copied from interface:SearchSortFactoryCreate a new sort factory whose root for all paths passed to the DSL will be the given object field.This is used to call reusable methods that can apply the same sort on different object fields that have same structure (same sub-fields).
- Specified by:
withRootin interfaceExtendedSearchSortFactory<ElasticsearchSearchSortFactory,ElasticsearchSearchPredicateFactory>- Specified by:
withRootin interfaceSearchSortFactory- Parameters:
objectFieldPath- The path from the current root to an object field that will become the new root.- Returns:
- A new sort factory using the given object field as root.
-
fromJson
public SortThenStep fromJson(com.google.gson.JsonObject jsonObject)
Description copied from interface:ElasticsearchSearchSortFactoryOrder elements according to a JSON sort definition.- Specified by:
fromJsonin interfaceElasticsearchSearchSortFactory- Parameters:
jsonObject- AJsonObjectrepresenting an Elasticsearch sort. The JSON object must be a syntactically correct Elasticsearch sort. See the Elasticsearch documentation.- Returns:
- A
SortThenStepallowing the retrieval of the sort or the chaining of other sorts.
-
fromJson
public SortThenStep fromJson(String jsonString)
Description copied from interface:ElasticsearchSearchSortFactoryOrder elements according to a JSON sort definition.- Specified by:
fromJsonin interfaceElasticsearchSearchSortFactory- Parameters:
jsonString- A JSON-formatted string representing an Elasticsearch sort. The JSON object must be a syntactically correct Elasticsearch sort. See the Elasticsearch documentation.- Returns:
- A
SortThenStepallowing the retrieval of the sort or the chaining of other sorts.
-
-