Hi,
script fields are meant to create on-the-fly new fields which can be
returned for each document that matches a query. Can you elaborate on why
you need to send the result of the script back to the query?
On Friday, November 1, 2013 5:36:45 PM UTC+1, rastro wrote:
I have a query that calls a python script. That part is working finally,
which is confirmed by the script's output to a log file.
Now, I need to get the value back to the query, but I only ever see
"my_field" : null
in the response.
How am I supposed to return the value from the script to the query? I'm
currently sending it back on stdout.
Luca pointed out that ES calls python with an 'eval', so multi-line scripts
won't work on the server side, either. There's some info in this jython
ticket:
http://bugs.jython.org/issue1713 .
I switched to javascript and am able to get the field back for facets and
script_fields.
Thanks, Luca.
On Monday, November 4, 2013 9:41:06 AM UTC-8, Luca Cavanna wrote:
Hi,
script fields are meant to create on-the-fly new fields which can be
returned for each document that matches a query. Can you elaborate on why
you need to send the result of the script back to the query?
On Friday, November 1, 2013 5:36:45 PM UTC+1, rastro wrote:
I have a query that calls a python script. That part is working finally,
which is confirmed by the script's output to a log file.
Now, I need to get the value back to the query, but I only ever see
"my_field" : null
in the response.
How am I supposed to return the value from the script to the query? I'm
currently sending it back on stdout.
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.