Class LuceneSearchSortFactoryImpl
java.lang.Object
org.hibernate.search.engine.search.sort.dsl.spi.AbstractSearchSortFactory<LuceneSearchSortFactory,LuceneSearchSortIndexScope<?>,LuceneSearchPredicateFactory>
org.hibernate.search.backend.lucene.search.sort.dsl.impl.LuceneSearchSortFactoryImpl
- All Implemented Interfaces:
LuceneSearchSortFactory,ExtendedSearchSortFactory<LuceneSearchSortFactory,,LuceneSearchPredicateFactory> SearchSortFactory
public class LuceneSearchSortFactoryImpl
extends AbstractSearchSortFactory<LuceneSearchSortFactory,LuceneSearchSortIndexScope<?>,LuceneSearchPredicateFactory>
implements LuceneSearchSortFactory
-
Field Summary
Fields inherited from class org.hibernate.search.engine.search.sort.dsl.spi.AbstractSearchSortFactory
dslContext -
Constructor Summary
ConstructorsConstructorDescriptionLuceneSearchSortFactoryImpl(SearchSortDslContext<LuceneSearchSortIndexScope<?>, LuceneSearchPredicateFactory> dslContext) -
Method Summary
Modifier and TypeMethodDescriptionfromLuceneSort(org.apache.lucene.search.Sort luceneSort) Order elements by a given LuceneSort.fromLuceneSortField(org.apache.lucene.search.SortField luceneSortField) Order elements by a given LuceneSortField.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
-
LuceneSearchSortFactoryImpl
public LuceneSearchSortFactoryImpl(SearchSortDslContext<LuceneSearchSortIndexScope<?>, LuceneSearchPredicateFactory> 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<LuceneSearchSortFactory,LuceneSearchPredicateFactory> - 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.
-
fromLuceneSortField
Description copied from interface:LuceneSearchSortFactoryOrder elements by a given LuceneSortField.- Specified by:
fromLuceneSortFieldin interfaceLuceneSearchSortFactory- Parameters:
luceneSortField- A Lucene sort field.- Returns:
- A
SortThenStepallowing the retrieval of the sort or the chaining of other sorts.
-
fromLuceneSort
Description copied from interface:LuceneSearchSortFactoryOrder elements by a given LuceneSort.- Specified by:
fromLuceneSortin interfaceLuceneSearchSortFactory- Parameters:
luceneSort- A Lucene sort.- Returns:
- A
SortThenStepallowing the retrieval of the sort or the chaining of other sorts.
-