Hi,
I need to merge data from two indices (test1
and test2
) based on a common key (information
). Here’s a simplified example of my indices:
Index test1
:
sample_id information price
--------- ------- ----------------
test1 11 52
test2 11 53
test3 11 54
Index test2
:
information net_price_value
------------- --------------
11 52
Desired Output:
sample_id information price net_price_value
-------------------------------------------------
test1 11 52 52
test2 11 53 52
test3 11 54 52
I've explored using the Elasticsearch Transform API (_transform
) with scripted metrics, but I'm encountering challenges in correctly combining and mapping data from both indices into a single transformed index (test3
). Could someone please advise on the best approach or provide a sample query to achieve this? Any insights or examples would be greatly appreciated.
Thank you in advance!