I have documents that contain a text field, and a few translations in other fields.
Some documents do have the original text, but are missing the translations.
I'm using a regular query and retrieving only the field I need according to the language, by using with _source field. I want to avoid retrieving both, the original and the requested translation every time.
Is there a way to retrieve a "fallback" field if the one used in _source does not exist?
Something like "retrieve _source['text_es'] but fallback to _source['text_en'] if text_es is null".
That would definitively solve our issue! But I just noticed it's available since 7.12 and we're using a very old 7.8.
We'll be upgrading to 8.x in the next few weeks so, I'll keep the ugly double field in our _source until then.
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.