Size of Query results

I am querying the elasticsearch using the java api.
I would like to get all the the results of the query without explicitly setting the query size.
Any idea on how to do this

This is not recommended, see https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-request-from-size.html