How we can achieve subqueries ( from SQL ) with elasticsearch? And also, how we can reuse the queries or build the queries based on the results of the other queries ?
I didn't seem to find an references with respect to this in documentation,
One option is query template but it assumes to supply a query template and parameterize the values based on the need which might not be suitable for subqueries or reusing the queries in different places