-
Notifications
You must be signed in to change notification settings - Fork 260
Impossible to set index.mapping.nested_objects_limit and index.requests.cache.enable #295
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
Comments
Thanks for the very detailed report. This is an issue in the API specification used to produce the Java code: The fix will be included in the next 8.x and 7.17.x releases. |
Timing on next release? |
* Fix MultiTermsRequest - elastic/elasticsearch-java#160 * TypeFieldMappings is a multi-key dictionary - elastic/elasticsearch-java#166 * Fix TranslateSqlResponse - elastic/elasticsearch-java#167 * Token filter properties are generally optional - elastic/elasticsearch-java#199 * Fix typo in IndexSettings.mapping and allow extended settings - elastic/elasticsearch-java#295 * ShardRecovery.stop_time_in_millis is optional - elastic/elasticsearch-java#202
* Fix MultiTermsRequest - elastic/elasticsearch-java#160 * TypeFieldMappings is a multi-key dictionary - elastic/elasticsearch-java#166 * Fix TranslateSqlResponse - elastic/elasticsearch-java#167 * Token filter properties are generally optional - elastic/elasticsearch-java#199 * Fix typo in IndexSettings.mapping and allow extended settings - elastic/elasticsearch-java#295 * ShardRecovery.stop_time_in_millis is optional - elastic/elasticsearch-java#202
* Fix MultiTermsRequest - elastic/elasticsearch-java#160 * TypeFieldMappings is a multi-key dictionary - elastic/elasticsearch-java#166 * Fix TranslateSqlResponse - elastic/elasticsearch-java#167 * Token filter properties are generally optional - elastic/elasticsearch-java#199 * Fix typo in IndexSettings.mapping and allow extended settings - elastic/elasticsearch-java#295 * ShardRecovery.stop_time_in_millis is optional - elastic/elasticsearch-java#202
Hi, |
Java API client version
7.17.4
Java version
17.0.3.1
Elasticsearch Version
7.17.0
Problem description
Attached is a mapping JSON file which correctly creates an index using HLRC, and fails using the newer Java client. A unit test class is provided to show what works and what does not, with both clients.
The json file (
fails_with_new_client.json
) gives an example of an ES mapping and settings that can be read directly by the old high level client to create an index, but when we attempt to use the new client, we get unknown field exceptions.co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.indices.IndexSettings: Unknown field 'index.mapping.nested_objects.limit' (JSON path: ['index.mapping.nested_objects.limit']) (line no=1, column no=38, offset=37)
and
co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.indices.IndexSettings: Unknown field 'requests' (JSON path: index.requests) (line no=1, column no=22, offset=21)
We provide unit tests demonstrating this failure and also showing that these fields cannot be used to create IndexSettings.
We've managed to get the desired functionality by separating out the mapping from the settings, and using separate builders to set what's possible, and then finally, once the index is created, using a low level rest call to set the remaining settings. This is, as you might expect, not satisfactory. These workarounds keep us from moving to the new client in production.
Having the HLRC be deprecated while the new client misses functionality seems like a peculiar decision
ESUnknownFieldExceptionTests.zip
.
The text was updated successfully, but these errors were encountered: