opensearch-net
opensearch-net copied to clipboard
[FEATURE] Integrate with the Microsoft.Extensions ecosystem
Is your feature request related to a problem?
It should be easier to set up the OpenSearch client in an ASP.NET Core application.
What solution would you like?
builder.Services.AddOpenSearchClient(...)
... and configuration in appsettings.json
, and logging with the ILogger
.
What alternatives have you considered?
https://github.com/MintPlayer/MintPlayer.AspNetCore.OpenSearch This is the only relevant library that I could find on NuGet, but it's not popular/official.
Otherwise, doing it all manually.
Do you have any additional context?
n/a
Hi @glen-84!
Thanks for sharing your feature request, I think it'd be helpful if you could expand a bit on what you'd like to see added/supported. Such as what types would you expect to be registered with the service collection, how might the configuration be structured, and what do you think the client should be logging itself.
what types would you expect to be registered with the service collection
An IOpenSearchClient
.
how might the configuration be structured
Maybe something like:
"OpenSearchClients": {
"Search": { // Named client.
"ConnectionPool": {
"Nodes": [
{
"Uri": "http://127.0.0.1:9201"
},
{
"Uri": "http://127.0.0.1:9202"
}
]
}
}
}
what do you think the client should be logging itself
Maybe something like this (at the information level).