-
Task
-
Resolution: Done
-
L3 - Default
-
None
-
None
-
Not defined
In some scenarios, we get the ES high level client from the Optimize client and make requests directly that way. One part of this is that we also have to fetch the request options at the same time, resulting in slightly awkward usage, i.e.:
esClient.doSomething(someRequest, esClient.requestOptions());
It might make sense to stop returning the high level client and instead expose the corresponding methods in the Optimize client, so callers can use that directly. This way, all of the request options logic could be wrapped by the Optimize client.
Note that there may be some scenarios (such as tests), where returning the high level client is entirely appropriate and that it might not make sense to always have Optimize client methodsĀ