BradVido
(BradVido)
March 5, 2015, 5:32pm
1
I understand that Groovy dynamic scripting has been disabled by default in
1.4.4 and I should either use a different language or put the script in the
config/scripts directory.
However, when calling a script for the value of a Stats aggregation
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-stats-aggregation.html#_script_5 ,
I cannot figure out how to specify the script_file parameter. I'm using the
Java API and the StatsBuilder class has only 1 method for the script, which
accepts a sting:
StatsBuilder.stats(String script)
If I specify the script string, I get (as expected):
ScriptException[dynamic scripting for [groovy] disabled]
Thanks!
--
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 elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/83258db0-c815-4508-8adb-d5be4d7ee0a5%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
jpountz
(Adrien Grand)
March 6, 2015, 9:07am
2
Hi Brad,
Giving the name of the file as a script (without extension) should work.
However I agree this is confusing and opened
Scripting: Java API does not match the REST layer · Issue #10011 · elastic/elasticsearch · GitHub .
On Thu, Mar 5, 2015 at 6:32 PM, BradVido bradyvidovic@gmail.com wrote:
I understand that Groovy dynamic scripting has been disabled by default in
1.4.4 and I should either use a different language or put the script in the
config/scripts directory.
However, when calling a script for the value of a Stats aggregation
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-stats-aggregation.html#_script_5 ,
I cannot figure out how to specify the script_file parameter. I'm using the
Java API and the StatsBuilder class has only 1 method for the script,
which accepts a sting:
StatsBuilder.stats(String script)
If I specify the script string, I get (as expected):
ScriptException[dynamic scripting for [groovy] disabled]
Thanks!
--
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 elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/83258db0-c815-4508-8adb-d5be4d7ee0a5%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/83258db0-c815-4508-8adb-d5be4d7ee0a5%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout .
--
Adrien Grand
--
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 elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j6uSqXRURWPStKpfdo%3DJ4JV9F4s-2Dw0UKSuR7XOpcUkg%40mail.gmail.com .
For more options, visit https://groups.google.com/d/optout .
BradVido
(BradVido)
March 6, 2015, 2:11pm
3
Great. That worked and thanks for opening the github issue! I see that
others agree this needs to be fixed.
--
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 elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6d8a438c-b1d4-4901-88b6-7d82d09a887c%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .