public abstract class SortBuilder<T extends SortBuilder<T>> extends java.lang.Object implements NamedWriteable, ToXContentObject, Rewriteable<SortBuilder<?>>
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static ParseField |
NESTED_FILTER_FIELD |
static ParseField |
NESTED_PATH_FIELD |
protected SortOrder |
order |
static ParseField |
ORDER_FIELD |
EMPTY_PARAMS
MAX_REWRITE_ROUNDS
Constructor and Description |
---|
SortBuilder() |
Modifier and Type | Method and 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,
NestedSortBuilder nestedSort) |
protected static IndexFieldData.XFieldComparatorSource.Nested |
resolveNested(QueryShardContext context,
java.lang.String nestedPath,
QueryBuilder nestedFilter) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getWriteableName
isFragment
toXContent
rewrite, rewrite, rewrite, rewrite, rewriteAndFetch, rewriteAndFetch
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