Search elasticsearch with java client using JSON query

I don't want to build a json query.
I have already some json queries. I just want to use them directly.

I was using this with ES 1.4.2 and it was working:

SearchResponse response= client.prepareSearch(indicesToSearch).setSource(query)
.execute().actionGet();
// query = Query string in JSON format

But this code is no more working with ES 5.1.1. Hence looking for solutions.