setExtraSource in Elastic 5.0.0

Hi,
In Elastic 5.0.0, there is no more setExtraSource to pass the query as String. Is there any alternative for this? How can I pass the query as string?

QueryBuilders#wrapperQuery has one for queries. I don't believe there is a thing for the rest of the search as a string any more.

Thank you.
What about replacement for setAggregations?

Regards,

I don't believe there is one.