Can you nest queries logically in ElasticSearch, so the output of one query is the input to another query. Another, way to ask is how can I chain or pipe queries together?
Elasticsearch doesn't support subqueries; you would need to perform your first query, then construct a second query using the results of the first query as an input.
That is totally correct, you must programm a subquery in your favorite programming language. An example can be found here:
http://www.sebastianviereck.de/en/elasticsearch-subquery-scoring-optimization/
this is not supported in elastic-search you must normalize your data and have all field you need in one setting