|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.search.sort.SortBuilder org.elasticsearch.search.sort.ScriptSortBuilder
public class ScriptSortBuilder
Script sort builder allows to sort based on a custom script expression.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
ToXContent.MapParams, ToXContent.Params |
Field Summary |
---|
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
EMPTY_PARAMS |
Constructor Summary | |
---|---|
ScriptSortBuilder(String script,
String type)
Constructs a script sort builder with the script and the type. |
Method Summary | |
---|---|
ScriptSortBuilder |
lang(String lang)
The language of the script. |
SortBuilder |
missing(Object missing)
Not really relevant. |
ScriptSortBuilder |
order(SortOrder order)
Sets the sort order. |
ScriptSortBuilder |
param(String name,
Object value)
Adds a parameter to the script. |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptSortBuilder(String script, String type)
script
- The script to use.type
- The type, can either be "string" or "number".Method Detail |
---|
public ScriptSortBuilder param(String name, Object value)
name
- The name of the parameter.value
- The value of the parameter.public ScriptSortBuilder order(SortOrder order)
order
in class SortBuilder
public SortBuilder missing(Object missing)
missing
in class SortBuilder
public ScriptSortBuilder lang(String lang)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |