Elasticsearch how to use a script(file) in an update

Posted by user2089283 on Stack Overflow See other posts from Stack Overflow or by user2089283
Published on 2014-08-20T22:16:54Z Indexed on 2014/08/20 22:20 UTC
Read the original article Hit count: 1051

Filed under:
|

Hi I want to do something like this:

curl -XPOST 'http://localhost:9200/customer92/listbuilder/a10/_update' -d '
{
     "_script": {
      "script":"summarization"
       }
}'

I have a summarization.groovy in my config/scripts folder . I am getting :

{"error":"ElasticsearchIllegalArgumentException[failed to execute script]; nested: GroovyScriptExecutionException[MissingPropertyException[No such property: summarization for class: Script6]]; ","status":400}%

What am I doing wrong ?

© Stack Overflow or respective owner

Related posts about groovy

Related posts about elasticsearch