From 6a936a9efcecdb13776119f5cb41081f344252a6 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Sun, 21 Oct 2012 00:46:19 +0200 Subject: [PATCH] Added method that accepts a map as script parameters --- .../elasticsearch/search/sort/ScriptSortBuilder.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java b/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java index 542903db5a7..3070a7a6f10 100644 --- a/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java +++ b/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java @@ -65,6 +65,16 @@ public class ScriptSortBuilder extends SortBuilder { return this; } + /** + * Sets parameters for the script. + * + * @param params The script parameters + */ + public ScriptSortBuilder setParams(Map params) { + this.params = params; + return this; + } + /** * Sets the sort order. */