NamedWriteable
, Writeable
, ToXContent
, ToXContentObject
, Rewriteable<SortBuilder<?>>
FieldSortBuilder
, GeoDistanceSortBuilder
, ScoreSortBuilder
, ScriptSortBuilder
public abstract class SortBuilder<T extends SortBuilder<T>> extends java.lang.Object implements NamedWriteable, ToXContentObject, Rewriteable<SortBuilder<?>>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static ParseField |
NESTED_FILTER_FIELD |
|
static ParseField |
NESTED_PATH_FIELD |
|
protected SortOrder |
order |
|
static ParseField |
ORDER_FIELD |
MAX_REWRITE_ROUNDS
EMPTY_PARAMS
Constructor | Description |
---|---|
SortBuilder() |
Modifier and Type | Method | Description |
---|---|---|
protected abstract SortFieldAndFormat |
build(QueryShardContext context) |
Create a @link
SortFieldAndFormat from this builder. |
static java.util.Optional<SortAndFormats> |
buildSort(java.util.List<SortBuilder<?>> sortBuilders,
QueryShardContext context) |
|
static java.util.List<SortBuilder<?>> |
fromXContent(XContentParser parser) |
|
SortOrder |
order() |
Return the
SortOrder used for this SortBuilder . |
T |
order(SortOrder order) |
Set the order of sorting.
|
protected static QueryBuilder |
parseNestedFilter(XContentParser parser) |
|
protected static IndexFieldData.XFieldComparatorSource.Nested |
resolveNested(QueryShardContext context,
java.lang.String nestedPath,
QueryBuilder nestedFilter) |
|
protected static IndexFieldData.XFieldComparatorSource.Nested |
resolveNested(QueryShardContext context,
NestedSortBuilder nestedSort) |
|
java.lang.String |
toString() |
getWriteableName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
rewrite
toXContent
isFragment
protected SortOrder order
public static final ParseField ORDER_FIELD
public static final ParseField NESTED_FILTER_FIELD
public static final ParseField NESTED_PATH_FIELD
protected abstract SortFieldAndFormat build(QueryShardContext context) throws java.io.IOException
SortFieldAndFormat
from this builder.java.io.IOException
public SortOrder order()
SortOrder
used for this SortBuilder
.public static java.util.List<SortBuilder<?>> fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException
public static java.util.Optional<SortAndFormats> buildSort(java.util.List<SortBuilder<?>> sortBuilders, QueryShardContext context) throws java.io.IOException
java.io.IOException
protected static IndexFieldData.XFieldComparatorSource.Nested resolveNested(QueryShardContext context, java.lang.String nestedPath, QueryBuilder nestedFilter) throws java.io.IOException
java.io.IOException
protected static IndexFieldData.XFieldComparatorSource.Nested resolveNested(QueryShardContext context, NestedSortBuilder nestedSort) throws java.io.IOException
java.io.IOException
protected static QueryBuilder parseNestedFilter(XContentParser parser)
public java.lang.String toString()
toString
in class java.lang.Object