Elasticsearch Java Client 9.5.0
Discover what changed in the 9.5.0 version of the Java client.
This version presents many updates to existing fields that were wrongly mapped, or incomplete. Here is the complete list of changes:
From single value to union type
Some fields have been remapped to tagged unions to correctly represent that they can accept more than one shape.
elasticsearch._types.mapping.DocValuesPropertyBase
docValues: modified fromBooleantoelasticsearch._types.mapping.DocValues, now a union of a simpleBoolean(enabled) or aDocValuesConfigobject (config)
elasticsearch.inference.RerankRequest
input: modified fromList<String>toelasticsearch.inference.rerank.RerankInput, now a union of a list of strings (string) or a list of objects (object)query: modified fromStringtoelasticsearch.inference.rerank.RerankQuery, now a union of a simple string (string) or an object (object)
Snapshot source-only repository remapping
SourceOnlyRepositorySettings is now a tagged union discriminated by delegate_type: choosing a delegate type (azure, gcs, url, s3 or fs) makes its own settings available.
- elasticsearch.snapshot.SourceOnlyRepositorySettings: now a tagged union (
azure,gcs,url,s3,fs)
For example, to register a source-only repository delegating to a shared file system (fs):
esClient.snapshot().createRepository(r -> r
.name("my_src_only_repository")
.repository(repo -> repo
.source(source -> source
.settings(settings -> settings
.fs(fs -> fs
.location("my_backup_repository")
)
)
)
)
);
Watcher fixes
Most of the watcher types were outdated and wrongly mapped. The following changes bring them in line with the actual API:
elasticsearch.watcher.ExecutionResultCondition
status: modified fromelasticsearch.watcher.ActionStatusOptionstoelasticsearch.watcher.ExecutionResultStatus
elasticsearch.watcher.ExecutionResultInput
status: modified fromelasticsearch.watcher.ActionStatusOptionstoelasticsearch.watcher.ExecutionResultStatus
elasticsearch.watcher.IndexResult
response: modified fromelasticsearch.watcher.IndexResultSummarytoList<IndexResultSummary>.IndexResultis now a union that can hold either theresponseof an executed index action or therequestthat would have run when the action is simulated
elasticsearch.watcher.IndexResultSummary
created: modified frombooleantoBoolean, now optionalversion: modified fromlongtoLong, now optional
elasticsearch.watcher.SearchInputRequestBody: removed
elasticsearch.watcher.SearchInputRequestDefinition
body: modified fromelasticsearch.watcher.SearchInputRequestBodytoelasticsearch.core.search.SearchRequestBody
Other changes
elasticsearch._types.analysis.SynonymTokenFilterBase
synonymsSet: modified fromStringtoList<String>, now required
elasticsearch.cluster.stats.DenseVectorOffHeapStats
totalCenifSizeBytes: renamed tototalCenivfSizeBytestotalCenifSize: renamed tototalCenivfSize
elasticsearch.indices.stats.ShardStats
indices: modified fromelasticsearch.indices.stats.IndicesStatstoMap<String, ShardStats>, now required
elasticsearch.inference.EmbeddingContentObject
content: modified fromelasticsearch.inference.EmbeddingContentObjectContentstoList<EmbeddingContentObjectItem>
elasticsearch.inference.EmbeddingContentObjectContents: removed
elasticsearch.security.Role
indices: modified fromList<IndicesPrivileges>toList<IndicesPrivilegesRead>
elasticsearch._types.mapping.SourceField
compress: removedcompressThreshold: removed
Nothing was added in this version of the client.
Nothing was deprecated in this version of the client.