NamedWriteable
, Writeable
, ToXContent
, ToXContentObject
, Rewriteable<SortBuilder<?>>
public class ScoreSortBuilder extends SortBuilder<ScoreSortBuilder>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
NAME |
MAX_REWRITE_ROUNDS
NESTED_FILTER_FIELD, NESTED_PATH_FIELD, order, ORDER_FIELD
EMPTY_PARAMS
Constructor | Description |
---|---|
ScoreSortBuilder() |
Build a ScoreSortBuilder default to descending sort order.
|
ScoreSortBuilder(StreamInput in) |
Read from a stream.
|
Modifier and Type | Method | Description |
---|---|---|
SortFieldAndFormat |
build(QueryShardContext context) |
Create a @link
SortFieldAndFormat from this builder. |
boolean |
equals(java.lang.Object object) |
|
static ScoreSortBuilder |
fromXContent(XContentParser parser,
java.lang.String fieldName) |
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
int |
hashCode() |
|
ScoreSortBuilder |
rewrite(QueryRewriteContext ctx) |
Rewrites this instance based on the provided context.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
buildSort, fromXContent, order, order, parseNestedFilter, resolveNested, resolveNested, toString
isFragment
public static final java.lang.String NAME
public ScoreSortBuilder()
public ScoreSortBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
java.io.IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOException
public static ScoreSortBuilder fromXContent(XContentParser parser, java.lang.String fieldName)
parser
- the input parser. The state on the parser contained in this context will be changed as a side effect of this
method callfieldName
- in some sort syntax variations the field name precedes the xContent object that specifies further parameters, e.g.
in '{ "foo": { "order" : "asc"} }'. When parsing the inner object, the field name can be passed in via this argumentpublic SortFieldAndFormat build(QueryShardContext context)
SortBuilder
SortFieldAndFormat
from this builder.build
in class SortBuilder<ScoreSortBuilder>
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getWriteableName()
NamedWriteable
public ScoreSortBuilder rewrite(QueryRewriteContext ctx) throws java.io.IOException
Rewriteable
java.io.IOException