public class ScriptSortBuilder extends SortBuilder
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
Constructor and Description |
---|
ScriptSortBuilder(Script script,
String type)
Constructs a script sort builder with the given script.
|
ScriptSortBuilder(String script,
String type)
Deprecated.
Use
ScriptSortBuilder(Script, String) instead. |
Modifier and Type | Method and Description |
---|---|
ScriptSortBuilder |
lang(String lang)
Deprecated.
Use
ScriptSortBuilder(Script, String) instead. |
SortBuilder |
missing(Object missing)
Not really relevant.
|
ScriptSortBuilder |
order(SortOrder order)
Sets the sort order.
|
ScriptSortBuilder |
param(String name,
Object value)
Deprecated.
Use
ScriptSortBuilder(Script, String) instead. |
ScriptSortBuilder |
setNestedFilter(QueryBuilder nestedFilter)
Sets the nested filter that the nested objects should match with in order to be taken into account
for sorting.
|
ScriptSortBuilder |
setNestedPath(String nestedPath)
Sets the nested path if sorting occurs on a field that is inside a nested object.
|
ScriptSortBuilder |
setParams(Map<String,Object> params)
Deprecated.
Use
ScriptSortBuilder(Script, String) instead. |
ScriptSortBuilder |
sortMode(String sortMode)
Defines which distance to use for sorting in the case a document contains multiple geo points.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params builderParams) |
toString
public ScriptSortBuilder(Script script, String type)
script
- The script to use.@Deprecated public ScriptSortBuilder(String script, String type)
ScriptSortBuilder(Script, String)
instead.script
- The script to use.type
- The type, can either be "string" or "number".@Deprecated public ScriptSortBuilder param(String name, Object value)
ScriptSortBuilder(Script, String)
instead.name
- The name of the parameter.value
- The value of the parameter.@Deprecated public ScriptSortBuilder setParams(Map<String,Object> params)
ScriptSortBuilder(Script, String)
instead.params
- The script parameters@Deprecated public ScriptSortBuilder lang(String lang)
ScriptSortBuilder(Script, String)
instead.public ScriptSortBuilder order(SortOrder order)
order
in class SortBuilder
public SortBuilder missing(Object missing)
missing
in class SortBuilder
public ScriptSortBuilder sortMode(String sortMode)
public ScriptSortBuilder setNestedFilter(QueryBuilder nestedFilter)
public ScriptSortBuilder setNestedPath(String nestedPath)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params builderParams) throws IOException
IOException
Copyright © 2009–2016. All rights reserved.