Parameters in inline script

(Leo Li) #1

Hi, does below query ever work in Elasticsearch 5.x?

"inline": "doc['my_field'] * multiplier",
"params": {
"multiplier": 2

Whenever I use parameters in query I always got compile errors. The query is from documentation:

(Leo Li) #2

It turns out the Elasticsearch documentation is wrong, you should add "params." in front of the variables in order to access its values.

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.