Skip to content

Latest commit

 

History

History
102 lines (70 loc) · 4.23 KB

File metadata and controls

102 lines (70 loc) · 4.23 KB
navigation_title 9.5.0

Elasticsearch Java Client 9.5.0 [elasticsearch-java-client-950]

Discover what changed in the 9.5.0 version of the Java client.

Breaking changes [elasticsearch-java-client-950-breaking-changes]

This version presents many updates to existing fields that were wrongly mapped, or incomplete. Here is the complete list of changes:

::::{dropdown} 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 from Boolean to elasticsearch._types.mapping.DocValues, now a union of a simple Boolean (enabled) or a DocValuesConfig object (config)
  • elasticsearch.inference.RerankRequest

    • input: modified from List<String> to elasticsearch.inference.rerank.RerankInput, now a union of a list of strings (string) or a list of objects (object)
    • query: modified from String to elasticsearch.inference.rerank.RerankQuery, now a union of a simple string (string) or an object (object) ::::

::::{dropdown} 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")
                )
            )
        )
    )
);

::::

::::{dropdown} 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 from elasticsearch.watcher.ActionStatusOptions to elasticsearch.watcher.ExecutionResultStatus
  • elasticsearch.watcher.ExecutionResultInput

    • status: modified from elasticsearch.watcher.ActionStatusOptions to elasticsearch.watcher.ExecutionResultStatus
  • elasticsearch.watcher.IndexResult

    • response: modified from elasticsearch.watcher.IndexResultSummary to List<IndexResultSummary>. IndexResult is now a union that can hold either the response of an executed index action or the request that would have run when the action is simulated
  • elasticsearch.watcher.IndexResultSummary

    • created: modified from boolean to Boolean, now optional
    • version: modified from long to Long, now optional
  • elasticsearch.watcher.SearchInputRequestBody: removed

  • elasticsearch.watcher.SearchInputRequestDefinition

    • body: modified from elasticsearch.watcher.SearchInputRequestBody to elasticsearch.core.search.SearchRequestBody ::::

::::{dropdown} Other changes

  • elasticsearch._types.analysis.SynonymTokenFilterBase

    • synonymsSet: modified from String to List<String>, now required
  • elasticsearch.cluster.stats.DenseVectorOffHeapStats

    • totalCenifSizeBytes: renamed to totalCenivfSizeBytes
    • totalCenifSize: renamed to totalCenivfSize
  • elasticsearch.indices.stats.ShardStats

    • indices: modified from elasticsearch.indices.stats.IndicesStats to Map<String, ShardStats>, now required
  • elasticsearch.inference.EmbeddingContentObject

    • content: modified from elasticsearch.inference.EmbeddingContentObjectContents to List<EmbeddingContentObjectItem>
  • elasticsearch.inference.EmbeddingContentObjectContents: removed

  • elasticsearch.security.Role

    • indices: modified from List<IndicesPrivileges> to List<IndicesPrivilegesRead>
  • elasticsearch._types.mapping.SourceField

    • compress: removed
    • compressThreshold: removed ::::

Features and enhancements [elasticsearch-java-client-950-features-enhancements]

Nothing was added in this version of the client.

Deprecations [elasticsearch-java-client-950-deprecations]

Nothing was deprecated in this version of the client.