Java API: ScriptSortBuilder does not pass the lang used, closes #1569.

This commit is contained in:
Shay Banon 2011-12-25 18:37:42 +02:00
parent fb218babe3
commit 038d91d134
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}