Elasticsearch 5.x setQuery deprecated

I have a question regarding the last version of Elasticsearch.

Until the previous version I was using the following JAVA API search:

SearchRequestBuilder request = client.prepareSearch(index).setSource(jsonQuery)

Now setSource is deprecated and it is recommended to use setQuery(QueryBuilder) instead.

My question is the following, is it possible to pass the whole json query as before?

Thanks in advanced

I think QueryBuilder#wrapperQuery works for the query portion but the rest doesn't have a direct replacement as far as I know.

Thank you for your help Nik

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.