public class ConnectedSortFieldContext extends ConnectedSortAdditionalSortFieldContext implements SortFieldContext, SortMissingValueContext<SortFieldContext>
queryContext, states| Constructor and Description |
|---|
ConnectedSortFieldContext(QueryBuildingContext queryContext,
SortFieldStates states) |
| Modifier and Type | Method and Description |
|---|---|
SortFieldContext |
asc()
Sort in ascending order.
|
org.apache.lucene.search.Sort |
createSort()
Return the Lucene
Sort corresponding to the requested sort. |
SortFieldContext |
desc()
Sort in descending order.
|
SortMissingValueContext<SortFieldContext> |
onMissingValue()
Describe how to treat missing values when doing the sorting.
|
SortFieldContext |
sortFirst()
Put documents with missing values first in the sorting.
|
SortFieldContext |
sortLast()
Put documents with missing values last in the sorting.
|
SortFieldContext |
use(Object value)
When documents are missing a value on the sort field, use the given value instead.
|
andByDistance, andByField, andByField, andByIndexOrder, andByNative, andByNative, andByScoregetQueryContext, getStatesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitandByDistance, andByField, andByField, andByIndexOrder, andByNative, andByNative, andByScorepublic ConnectedSortFieldContext(QueryBuildingContext queryContext, SortFieldStates states)
public SortFieldContext asc()
SortOrderasc in interface SortOrder<SortFieldContext>public SortFieldContext desc()
SortOrderdesc in interface SortOrder<SortFieldContext>public org.apache.lucene.search.Sort createSort()
SortTerminationSort corresponding to the requested sort.createSort in interface SortTerminationpublic SortMissingValueContext<SortFieldContext> onMissingValue()
SortFieldContextonMissingValue in interface SortFieldContextpublic SortFieldContext sortLast()
SortMissingValueContextThis instruction is independent of whether the sort is being ascending or descending.
sortLast in interface SortMissingValueContext<SortFieldContext>public SortFieldContext sortFirst()
SortMissingValueContextThis instruction is independent of whether the sort is being ascending or descending.
sortFirst in interface SortMissingValueContext<SortFieldContext>public SortFieldContext use(Object value)
SortMissingValueContextLucene sort API limits this feature to numeric fields. As Hibernate Search sorts are currently based on the Lucene API underneath, this is only available for numeric fields for all the indexing services, Elasticsearch included.
Field bridges, if any, will be ignored. Thus the actual numeric value must be provided.
use in interface SortMissingValueContext<SortFieldContext>Copyright © 2006–2017 Hibernate. All rights reserved.