Hi Steve,

The 'script_id' parameter is used to find indexed scripts (scripts stored 
in the special .scripts index). This is considered part of dynamic 
scripting. As you are using file scripts you should use the 'script_file' 
parameter to specify the name of your script. More information on this can 
be found 
here: 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html#modules-scripting

Hope this helps,

Colin

On Wednesday, 4 March 2015 18:10:48 UTC, Steve Freegard wrote:
>
> Hi All, 
>
> I've just done a fresh install of ElasticSearch 1.4.4 and I was 
> previously using ElasticSearch 1.3 and I've run into an issue with my 
> app that I can't resolve. 
>
> I converted my MVEL scripts to Groovy and placed them into the 
> config/scripts directory, each with .groovy extensions, but whenever I 
> use the Update API to attempt to call these scripts I get a 
> ScriptException saying that dynamic script is disabled, despite the fact 
> that I'm not trying to use dynamic scripting: 
>
> [2015-03-04 17:58:15,938][WARN ][bulk.udp                 ] [Gardener] 
> [21] failed to execute bulk request: failure in bulk execution: 
> [2]: index [messages-20150304], type [message], id 
> [F982263F-8804-4014-803C-885B6EA04EBD.1], message 
> [ElasticsearchIllegalArgumentException[failed to execute script]; 
> nested: ScriptException[dynamic scripting for [groovy] disabled]; ] 
>
> I can see from the logs that ES is seeing the scripts and compiling them: 
>
> [2015-03-04 17:36:16,485][INFO ][script                   ] [Gardener] 
> compiling script file [/etc/elasticsearch/scripts/update_subsc 
> ription.groovy] 
> [2015-03-04 17:36:16,449][INFO ][script                   ] [Gardener] 
> compiling script file [/etc/elasticsearch/scripts/update_messa 
> ge.groovy] 
> [2015-03-04 17:36:16,417][INFO ][script                   ] [Gardener] 
> compiling script file [/etc/elasticsearch/scripts/update_defer 
> red_message.groovy] 
> [2015-03-04 17:36:15,935][INFO ][script                   ] [Gardener] 
> compiling script file [/etc/elasticsearch/scripts/update_bounc 
> ed_message.groovy] 
>
> I'm using the Bulk UDP API to send the update like this: 
>
> {"update":{"_index":"messages-20150304","_type":"message","_id":"CF152663-CA97-45A4-9A16-FAB2E306831F.1"}}
>  
>
> {"script_id":"update_message","params":{"rcpt":"[email protected]","host":"
> inbound.mxdomain.com","ip":"98.129.185.132","port":25,"response":"Ok: 
> queued as 
> 44/C5-01861-E0947F45","secured":true,"mode":"SMTP","delay":2.786,"status":"delivered"}}
>  
>
>
> I was using 'script' instead of 'script_id' on 1.3.0, but I checked it 
> as per the docs. 
>
> Can anyone see what I'm doing wrong an point me in the right direction? 
>
> Thanks in advance. 
>
> Kind regards, 
> Steve. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/c066cb0e-e377-43f1-a30b-76d10d389bc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to