Hi,
Let's say that I have two index. "Main" and "Daily".
Main contain a lot of field but is almost never updated.
Daily contain few field but is frequently subject to update.
Could I use a script to look for an entity wich got "field26" : "Arthur", then take the "ID" of this entity and look for it in Daily which got this ID as a foreign key?
Thus having access to Daily knowing only one field of Main in a single query.
Scripts operate within elasticsearch in very specific contexts. For example, there are scoring scripts that manipulate the scores of documents as they are collected during search. They are meant to be small pieces of code which have limited access to other systems (for example, networking). What you describe sounds like a join. You should do this client side; doing so in elasticsearch (whether in a script or not) will not be any more efficient.
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.