Yes, you can, though setting the lang is not relevant when using scripts
that are registered on the node level, the language is detected based on
the extension of the file, in which case its javascript cause you call it
update.js. The failure, btw, means that your script is wrong, and tries to
access a property that is not there.
Which extension should be used for mvel script files?
Does stored scripts supports text indentation? The main reason for me to
use it, it looks less ugly that 'all in one string'.
And i don't understand, what could be wrong with it, it's exactly the same
script that I've used in script 'all-in-one-string' and it worked ok.
Le mercredi 27 juin 2012 21:20:58 UTC+6, kimchy a écrit :
Yes, you can, though setting the lang is not relevant when using scripts
that are registered on the node level, the language is detected based on
the extension of the file, in which case its javascript cause you call it
update.js. The failure, btw, means that your script is wrong, and tries to
access a property that is not there.
Which extension should be used for mvel script files?
Does stored scripts supports text indentation? The main reason for me to
use it, it looks less ugly that 'all in one string'.
And i don't understand, what could be wrong with it, it's exactly the same
script that I've used in script 'all-in-one-string' and it worked ok.
Le mercredi 27 juin 2012 21:20:58 UTC+6, kimchy a écrit :
Yes, you can, though setting the lang is not relevant when using scripts
that are registered on the node level, the language is detected based on
the extension of the file, in which case its javascript cause you call it
update.js. The failure, btw, means that your script is wrong, and tries to
access a property that is not there.
I changed extension, looks like now it defines correct lang and shows error.
"error" : "ElasticSearchIllegalArgumentException[failed to execute script];
nested: RuntimeException[cannot invoke method: size]; nested: ",
It's related to this:
ctx._source.inventory.size()
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.