opensearch-project / opensearch-java

Java Client for OpenSearch
Apache License 2.0
122 stars 183 forks source link

[FEATURE] Add max_slices_per_pit to index settings operations #1130

Open nwoike opened 2 months ago

nwoike commented 2 months ago

Is your feature request related to a problem?

The max_slices_per_pit index setting is completely missing from the index settings operations.

What solution would you like?

There should be an API similar to those for available for max_slices_per_scroll.

What alternatives have you considered?

I am able to configure this setting using the JavaScript client but that is not an option for this use-case.

Do you have any additional context?

APIs should look something like the following from client perspective.

val response = indices().getSettings(
    GetIndicesSettingsRequest
        .of { r -> r.index(index) }
)

response.result()[index]?.settings()?.maxSlicesPerPit()

indices().putSettings(
    PutIndicesSettingsRequest
        .of { p -> p.index(index).settings { s -> s.maxSlicesPerPit(maxSliceCount) } }
)
dblock commented 2 months ago

Thanks. FYI we're also working on generating this code from spec in #366, appreciate if you could contribute the missing setting(s) to https://github.com/opensearch-project/opensearch-api-specification.