I don't see anything particularly wrong with your sample. When
doc['some_field'].value returns 0, it might indicate that 'some_field' is
mapped as integer and is missing for the given record. But since you have
stated that the field "components" is indexed as text, I am not really sure
what it might be. Are you restarting elasticsearch every time you update
the script? If yes, could you provide a short repro of this issue?
On Wednesday, December 5, 2012 2:59:38 PM UTC-5, George Xing wrote:
I'm trying to use a preloaded javascript file stored in
/config/scripts/test.js
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.