I cannot use a client-side solution since there are too many entities and retrieving all of them and merging would be probably too slow for my application.
"reason": {
"type": "script_exception",
"reason": "failed to run inline script [def syn = params['synonyms'][doc['country'].value]; if (syn != null) {return syn;} else {return doc['country'].value;};] using lang [groovy]",
"caused_by": {
"type": "missing_property_exception",
"reason": "No such property: params for class: e82d610ed84d9787d1d68c886deeb38bf8cb319e"
}
}
If don't find the value in params, there's an error.
How can I get the null value back if I don't find the value in params?
I’ve no idea I’m afraid because I don’t have 2.2/groovy. Try removing the params and hard coding the list of values in the script as “if == kr” type statements.
Even better - upgrade. Later versions have:
less bugs
better supported
• no serious security vulnerabilities like those found in older versions running groovy.
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.