I have two Elastic cloud indices on the same cluster both have one common field Transactionid , Can I join both indices to get combined results

I have two Elastic cloud indices on the same cluster both have one common field Transactionid , Can I join both indices to get combined results

Elasticsearch does not support joins so doing this at query time is generally not possible. There are workarounds that may require you to restructure your data, but in order to recommend one of these we would need to know more about the data and what you are looking to achieve.

Thanks Chirstian
My use case is as follows

I have four Tables in my MySQL database
Order - which has order information, Shipping table with shipment information , Cancellation table with cancellation information and refund table with refund information

All four tables will have transaction id

I am getting CDC data from MYSQL to create separate indices in Elastic search
I would like to create a dataview for Order summary which will include Transaction id and other relevant fields from order, shipment, cancellation and refund indexes

does it make sense

You should merge all the data before indexing in Elasticsearch and index only one document: a transaction which contains all the informations from the 4 tables.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.