Exporting the output of elasticsearch query

How can we export the output of query running in elasticsearch like any search or update query ?

For large result sets there is a dedicated API for this - see https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-request-scroll.html