jillesvangurp / kt-search

Multi platform kotlin client for Elasticsearch & Opensearch with easily extendable Kotlin DSLs for queries, mappings, bulk, and more.
MIT License
112 stars 24 forks source link

[FEAT] Support for Elastic Cloud #155

Open szaffarano opened 6 days ago

szaffarano commented 6 days ago

Describe the enhancement

Although building an elastic client for an ESS cluster is possible, the nodes must be configured manually (i.e., nodesSelector). The cloudId property provided by ESS has information about it, so that it's easier just to provide apiKey, apiSecret and cloudId to have a working client.

In a project, I've implemented an extension method for that. If you agree, I can submit the code.

Why is this needed?

Simplify the code

How do you think it should be done?

Already been implemented as an extension function, but it also could be implemented as a new KtorRestClient constructor

Will you be able to help with a pull request?

Yes!

jillesvangurp commented 6 days ago

Amazing. Please contribute this.