-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Missing Index Setting Options #307
Comments
Probably it would be a good idea to offer a more generic (but not type-safe) way of interacting with OpenSearch for endpoints/features that are not yet available in the client. |
Feel free to PR this fix, and maybe open an issue about the semi-generic CURL capability |
Stumbled upon this problem during migration from Elasticsearch. Working on the PR at the moment, going to add |
Thank you @Mstrutov! |
What is the bug?
org.opensearch.client.opensearch.indices.IndexSettings
does not support all configuration options offered by the server. For instance, there is no way to settranslog.sync_interval
.How can one reproduce the bug?
If one tries to construct the index settings object via its builder, there is the setter
translogDurability(String)
fortranslog.durability
, but no corresponding setter fortranslog.sync_interval
. (When I check the settings of an existing index with request parameterinclude_defaults=true
, then I see even more attributes not available inIndexSettings
.)Since many developers are likely to read the index settings and type mappings from a file, the following test seems relevant:
The test fails with the message:
The attribute
translog.sync_interval
has been lost.As an aside: I am surprised the deserializer only recognizes the string-valued attribute
translog.durability
, not an object-valued attributetranslog
whose value then contains an attributedurability
.What is the expected behavior?
All index configuration options should be available through the Java client.
What is your host/environment?
OpenSearch 2.4.1, Java client 2.1.0
Do you have any additional context?
I am migrating some code from Elasticsearch 7.10 + Rest high-level client to OpenSearch 2.x + Java client. The index in question will be filled in a long running bulk update. If the ingest of the document corpus fails for some reason, then the index is discarded anyway. Therefore, I prefer to set
translog.durability
toasync
andtranslog.sync_interval
to a value in the minute range.The text was updated successfully, but these errors were encountered: