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
Constructors Constructor Description LuceneSearchSortFactoryImpl(SearchSortDslContext<LuceneSearchSortIndexScope<?>,LuceneSearchPredicateFactory> dslContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortThenStepfromLuceneSort(org.apache.lucene.search.Sort luceneSort)Order elements by a given LuceneSort.SortThenStepfromLuceneSortField(org.apache.lucene.search.SortField luceneSortField)Order elements by a given LuceneSortField.LuceneSearchSortFactorywithRoot(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
-
LuceneSearchSortFactoryImpl
public LuceneSearchSortFactoryImpl(SearchSortDslContext<LuceneSearchSortIndexScope<?>,LuceneSearchPredicateFactory> dslContext)
-
-
Method Detail
-
withRoot
public LuceneSearchSortFactory 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<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
public SortThenStep fromLuceneSortField(org.apache.lucene.search.SortField luceneSortField)
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
public SortThenStep fromLuceneSort(org.apache.lucene.search.Sort luceneSort)
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.
-
-