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.
|
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, andByScore
getQueryContext, getStates
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andByDistance, andByField, andByField, andByIndexOrder, andByNative, andByNative, andByScore
public ConnectedSortFieldContext(QueryBuildingContext queryContext, SortFieldStates states)
public SortFieldContext asc()
SortOrder
asc
in interface SortOrder<SortFieldContext>
public SortFieldContext desc()
SortOrder
desc
in interface SortOrder<SortFieldContext>
public Sort createSort()
SortTermination
Sort
corresponding to the requested sort.createSort
in interface SortTermination
public SortMissingValueContext<SortFieldContext> onMissingValue()
SortFieldContext
onMissingValue
in interface SortFieldContext
public SortFieldContext sortLast()
SortMissingValueContext
This instruction is independent of whether the sort is being ascending or descending.
sortLast
in interface SortMissingValueContext<SortFieldContext>
public SortFieldContext sortFirst()
SortMissingValueContext
This instruction is independent of whether the sort is being ascending or descending.
sortFirst
in interface SortMissingValueContext<SortFieldContext>
public SortFieldContext use(Object value)
SortMissingValueContext
Lucene 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 Red Hat, Inc. All Rights Reserved