Platform creates 2 elasticsearch clients: data and admin. NP plugins may access them via ElasticsearchServiceSetup contract and RequestHandlerContext context. We are deprecating the former API in favor of using contexts.
Plugins also may create their custom cluster clients via elasticsearch.createCluster. By default, those clients do not present in RequestHandlerContext. It might be now obvious why some clients are available via context and some not. We should document that plugins should extend context for their custom cluster clients, otherwise they will have behavior inconsistent with the platform API.
Platform creates 2 elasticsearch clients:
dataandadmin. NP plugins may access them viaElasticsearchServiceSetupcontract andRequestHandlerContextcontext. We are deprecating the former API in favor of using contexts.Plugins also may create their custom cluster clients via
elasticsearch.createCluster. By default, those clients do not present inRequestHandlerContext. It might be now obvious why some clients are available via context and some not. We should document that plugins should extend context for their custom cluster clients, otherwise they will have behavior inconsistent with the platform API.