Hi all -- I'd like to emit to stdout information within my custom .js
script (located in /elasticsearch/1.4.2/config/scripts/test.js).
I've tried both console.log and print (just a guess), but neither work:
"error": "ElasticsearchIllegalArgumentException[failed to execute script];
nested: EcmaError[ReferenceError: "console" is not defined.
(Script2.js#19)]; "
"error": "ElasticsearchIllegalArgumentException[failed to execute script];
nested: EcmaError[ReferenceError: "print" is not defined.
(Script1.js#19)]; "
Any way for me to hook into stdout to emit logging information this way?
Thanks very much.
Its very much possible from groovy , by accessing the Elasticsearch logger
instance.
You should be able to do something similar for javascript too.
Some good folks from Elasticsearch has given a good documentation on it
against my issue.
Hi all -- I'd like to emit to stdout information within my custom .js
script (located in /elasticsearch/1.4.2/config/scripts/test.js).
I've tried both console.log and print (just a guess), but neither work:
"error": "ElasticsearchIllegalArgumentException[failed to execute script];
nested: EcmaError[ReferenceError: "console" is not defined.
(Script2.js#19)]; "
"error": "ElasticsearchIllegalArgumentException[failed to execute script];
nested: EcmaError[ReferenceError: "print" is not defined.
(Script1.js#19)]; "
Any way for me to hook into stdout to emit logging information this way?
Thanks very much.
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.