public abstract class SortBuilder<T extends SortBuilder<T>> extends ToXContentToBytes implements NamedWriteable
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
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(QueryParseContext context) |
SortOrder |
order()
Return the
SortOrder used for this SortBuilder . |
T |
order(SortOrder order)
Set the order of sorting.
|
protected static QueryBuilder |
parseNestedFilter(XContentParser parser,
QueryParseContext context) |
protected static IndexFieldData.XFieldComparatorSource.Nested |
resolveNested(QueryShardContext context,
java.lang.String nestedPath,
QueryBuilder nestedFilter) |
buildAsBytes, buildAsBytes, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getWriteableName
isFragment, toXContent
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(QueryParseContext context) 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 QueryBuilder parseNestedFilter(XContentParser parser, QueryParseContext context)