Skip to content

Commit

Permalink
Correct syntax from backport
Browse files Browse the repository at this point in the history
User older format of map

Relates to #48425
  • Loading branch information
mayya-sharipova committed Oct 23, 2019
1 parent 975dbec commit 9e9533f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ public void testRewrittenQuery() {
refresh();

RangeQueryBuilder rangeQB = new RangeQueryBuilder("field1").from("2019-01-01"); // the query should be rewritten to from:null
Script script = new Script(ScriptType.INLINE, CustomScriptPlugin.NAME, "doc['field2'].value * param1", Map.of("param1", 0.1));
Map<String, Object> params = new HashMap<>();
params.put("param1", 0.1);
Script script = new Script(ScriptType.INLINE, CustomScriptPlugin.NAME, "doc['field2'].value * param1", params);
SearchResponse resp = client()
.prepareSearch("test-index2")
.setQuery(scriptScoreQuery(rangeQB, script))
Expand Down

0 comments on commit 9e9533f

Please sign in to comment.