Java API: ScriptSortBuilder does not pass the lang used, closes #1569.
This commit is contained in:
parent
fb218babe3
commit
038d91d134
|
@ -27,8 +27,6 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* Script sort builder allows to sort based on a custom script expression.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ScriptSortBuilder extends SortBuilder {
|
||||
|
||||
|
@ -100,6 +98,9 @@ public class ScriptSortBuilder extends SortBuilder {
|
|||
if (order == SortOrder.DESC) {
|
||||
builder.field("reverse", true);
|
||||
}
|
||||
if (lang != null) {
|
||||
builder.field("lang", lang);
|
||||
}
|
||||
if (this.params != null) {
|
||||
builder.field("params", this.params);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue