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
ConstructorsConstructorDescriptionElasticsearchSearchSortFactoryImpl(SearchSortDslContext<ElasticsearchSearchSortIndexScope<?>, ElasticsearchSearchPredicateFactory> dslContext) -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.google.gson.JsonObject jsonObject) Order elements according to a JSON sort definition.Order elements according to a JSON sort definition.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, 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.sort.dsl.ExtendedSearchSortFactory
distance, distance, fieldMethods inherited from interface org.hibernate.search.engine.search.sort.dsl.SearchSortFactory
composite, composite, extension, extension, indexOrder, score, toAbsolutePath, withParameters
-
Constructor Details
-
ElasticsearchSearchSortFactoryImpl
public ElasticsearchSearchSortFactoryImpl(SearchSortDslContext<ElasticsearchSearchSortIndexScope<?>, ElasticsearchSearchPredicateFactory> dslContext)
-
-
Method Details
-
withRoot
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
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
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.
-