SearchRequest.templateSource was deprecated, how to now?

Im trying to update a 2.3.0 plugin to 6.6.1, and I can't find the new way of executing a template, current code:
ByteReferece byteRef = ...
SearchRequest searchRequest = new SearchRequest();
searchRequest.templateSource(byteRef);, new RestStatusToXContentListener<>(channel, response));

To shad some light or context on the plugin, it is executing a query on a slightly different DSL that include more information about the request, eventually it needs to executed a templated request that accept a list of parameters that are resolved on the plugin side (es node).

thank you.

Have you seen the SearchTemplateRequest class? If that is not sufficient maybe you can provide a little bit more background.


I have seen this class, but its not part of:


so far we haven't used the client dependency explicitly we got a client from the dependency above, are you suggesting we add:


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