Lets say, I have 2 indices.
IndexA and IndexB.
IndexA has:
name and id.
IndexB has:
id and salary
I need to have name and corresponding salary to the same ID.
Lets say, I have 2 indices.
IndexA and IndexB.
IndexA has:
name and id.
IndexB has:
id and salary
I need to have name and corresponding salary to the same ID.
If you want one single document as a result, that won't be possible as elasticsearch does not support joins but if you want to get both documents, then that's a basic search across multiple indices.
What is exactly your need?
If id from IndexA is equal to id from IndexB then increment the salary for that id by 300
But does your data look like? Why do you have 2 indices?
The index is given as it is.
We need to perform operations on given indices.
If you can't change the model to something which looks like a better practice, then you need to solve most likely all that on your application level, like:
Can this be done in a single request?
No. Only if you change your modeling.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.