It sounds silly and it can be done easily using any programming language using looping , but I was wondering if E.S provides such feature.For example consider this query
SELECT product_name FROM sales WHERE brand_name="sony"
This will give many result ( please consider elasticsearch query equivalent of this query ).Now I want to do something like
foreach ( 'result_from_above_query'" as 'dummy_variable')
SELECT mrp FROM sales WHERE product_name="value_held_by_dummy_variable"
Is it possible using elasticsearch?