elastic / elasticsearch-net

This strongly-typed, client library enables working with Elasticsearch. It is the official client maintained and supported by Elastic.
https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/index.html
Apache License 2.0
3.57k stars 1.15k forks source link

[FEATURE] Support update index settings API #7703

Open SandervWickeren opened 1 year ago

SandervWickeren commented 1 year ago

Elastic.Clients.Elasticsearch version: 8.1.0

Elasticsearch version: 8.7.x

.NET runtime version: .Net7

Operating system version: not applicable

Description of the problem including expected versus actual behavior: As mentioned in Tune Index for Speed, you should update the index settings before and after indexing if you want to tune for speed. We are in a process of upgrading our Elastic setup from Nest to ElasticsearchClient and it seems like the update index settings api isn't supported yet.

Any chance this can be added in a next release?

Steps to reproduce:

  1. There is no implementation of UpdateSettingsAsync, while it does exists for Nest.

Expected behavior Support added

stevejgordon commented 1 year ago

Thanks for raising this, @SandervWickeren. Index settings are a little complex since we must explicitly distinguish between null and unset values, which have specific meanings. We are in the process of updating the specification to represent these such that code generators can produce proper representations of explicitly nullable properties. I think we need that work to land before we can introduce this endpoint.

SandervWickeren commented 1 year ago

@stevejgordon thanks for the quick reply! In that case, I'll continue to use the NEST client alongside the new ElasticsearchClient for now, and port as soon as this feature is released.

TheFireCookie commented 1 year ago

Hello, this is blocking for us too. Any plan to advance on that?

flobernd commented 1 year ago

Hi @TheFireCookie! The progress can be tracked in issue that was mentioned by Steve: https://github.com/elastic/elasticsearch-specification/issues/2049

As you can see, there is some stuff going on, but unfortunately not all prerequisites are done yet.

apr-un commented 3 months ago

Hi, fyi: @SandervWickeren , @TheFireCookie this functionality is implemented and I can confirm it works correctly thanks to @flobernd :) See example code at https://github.com/elastic/elasticsearch-net/issues/8204

flobernd commented 3 months ago

There is still a small part missing. The "unset" aka semantic null functionality is not implemented yet. I plan to ship this feature soon, but most of the Index Settings API is already functional 🙂