mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
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.
|
* Script sort builder allows to sort based on a custom script expression.
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class ScriptSortBuilder extends SortBuilder {
|
public class ScriptSortBuilder extends SortBuilder {
|
||||||
|
|
||||||
@ -100,6 +98,9 @@ public class ScriptSortBuilder extends SortBuilder {
|
|||||||
if (order == SortOrder.DESC) {
|
if (order == SortOrder.DESC) {
|
||||||
builder.field("reverse", true);
|
builder.field("reverse", true);
|
||||||
}
|
}
|
||||||
|
if (lang != null) {
|
||||||
|
builder.field("lang", lang);
|
||||||
|
}
|
||||||
if (this.params != null) {
|
if (this.params != null) {
|
||||||
builder.field("params", this.params);
|
builder.field("params", this.params);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user