From d06b52d9fd4756fca7303be7825d5f02c580b32a Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Fri, 25 Jul 2025 18:35:04 +0200 Subject: [PATCH] added 9.1 docs --- docs/reference/release-highlights.md | 6 ++- docs/release-notes/9-0-4.md | 2 +- docs/release-notes/9-1-0.md | 75 ++++++++++++++++++++++++++++ docs/release-notes/index.md | 3 ++ docs/release-notes/toc.yml | 1 + 5 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 docs/release-notes/9-1-0.md diff --git a/docs/reference/release-highlights.md b/docs/reference/release-highlights.md index 8ead164ed..eaf5d0fdf 100644 --- a/docs/reference/release-highlights.md +++ b/docs/reference/release-highlights.md @@ -9,6 +9,10 @@ These are the important new features and changes in minor releases. Every releas For a list of detailed changes, including bug fixes, see the [GitHub project release notes](https://github.com/elastic/elasticsearch-java/releases). +## 9.1.0 [release-highlights-910] + +[Release notes](/release-notes/9-1-0.md) + ## 9.0.0 [release-highlights-900] [Release notes](/release-notes/9-0-0.md) @@ -36,4 +40,4 @@ To view release notes for earlier versions, use the version dropdown in the top #### 8.15 [_version_8_15] -[Release notes](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/8.15/release-highlights.html) \ No newline at end of file +[Release notes](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/8.15/release-highlights.html) diff --git a/docs/release-notes/9-0-4.md b/docs/release-notes/9-0-4.md index 7a113f693..529c2f866 100644 --- a/docs/release-notes/9-0-4.md +++ b/docs/release-notes/9-0-4.md @@ -5,7 +5,7 @@ navigation_title: "9.0.4" Discover what changed in the 9.0.4 version of the java client. -### Features and enhancements [elasticsearch-java-client-900-features-enhancements] +### Features and enhancements [elasticsearch-java-client-904-features-enhancements] ::::{dropdown} Added callbacks to Rest5Client builder Rest5ClientBuilder now has the same level of in depth configuration the Legacy RestClientBuilder has, allowing to customize the underlying Apache HttpClient through callback functions; for example, this is how to configure the IOReactor's thread count: diff --git a/docs/release-notes/9-1-0.md b/docs/release-notes/9-1-0.md new file mode 100644 index 000000000..19ec73d49 --- /dev/null +++ b/docs/release-notes/9-1-0.md @@ -0,0 +1,75 @@ +--- +navigation_title: "9.1.0" +--- +# Elasticsearch Java Client 9.1.0 [elasticsearch-java-client-910] + +Discover what changed in the 9.1.0 version of the Java client. + +### Breaking changes [elasticsearch-java-client-910-breaking-changes] + +::::{dropdown} Map to NamedValue Highlight.fields +`fields` in `Highlight` was wrongly mapped as `List`, but the server doesn't actually accept more than one value, so the type has been changed to `List`. + +**Action**
Change the builder to use the correct type. +Example with `SearchRequest`: +- Old + ```java + esClient.search(s -> s + .index("*") + .highlight(h -> h + .fields(Map.of("highlighter-field", HighlightField.of(hf -> hf...))) + ) + ,Void.class); + ``` +- New + ```java + esClient.search(s -> s + .index("*") + .highlight(h -> h + .fields(NamedValue.of("highlighter-field", HighlightField.of(hf -> hf...))) + ) + ,Void.class); + ``` + +:::: + +::::{dropdown} Map to List WeightedTokensQuery.tokens +`tokens` in `WeightedTokensQuery` was mapped as `Map`, but the server can actually accept more than one map, so the type has been changed to `List`. + +**Action**
Nothing should be changed since the builders for List also accept a single value. +:::: + +:::: + +::::{dropdown} Class name change: IndicesBlockStatus -> AddIndicesBlockStatus in AddBlockResponse +`IndicesBlockStatus` was renamed to `AddIndicesBlockStatus` to avoid confusion with the new `RemoveIndicesBlockStatus` + +**Action**
Replace the missing class with the new class name. +:::: + +### Features and enhancements [elasticsearch-java-client-910-features-enhancements] + +::::{dropdown} Opentelemetry update to stable conventions +Following the stable release of Opentelemetry's database conventions, the client was updated to use the correct attribute names. +More details in the PR: https://github.com/elastic/elasticsearch-java/pull/1017 +:::: + +::::{dropdown} GetAliasResponse exception bug fix +`GetAliasesResponse` is a special case because it can return both an exception and the actual response, in case 2 aliases, 1 present and 1 missing, are added to `GetAliasesRequest`. The java client was unable to parse the response and used to throw a `TransportException`, this was fixed by adding the additional alias information to the `metadata` field in `ErrorCause`: +```java +try{ + client.indices().getAlias(a -> a.name("test","test2")); +} +catch (ElasticsearchException e){ + Map metadata = e.error().metadata(); + JsonData index = metadata.get("example-index"); + Map aliases = index.to(Map.class); + assertEquals("test", aliases.keySet().iterator().next()); +} +``` +More details in the PR: https://github.com/elastic/elasticsearch-java/pull/1041 +:::: + +### Deprecations [elasticsearch-java-client-910-deprecations] + +Nothing was deprecated in this version of the client. diff --git a/docs/release-notes/index.md b/docs/release-notes/index.md index 1c64780b9..39c2520e4 100644 --- a/docs/release-notes/index.md +++ b/docs/release-notes/index.md @@ -12,3 +12,6 @@ To check for security updates, go to [Security announcements for the Elastic sta ## 9.0.0 [Release notes](../release-notes/9-0-0.md) + +## 9.0.1 +[Release notes](../release-notes/9-1-0.md) diff --git a/docs/release-notes/toc.yml b/docs/release-notes/toc.yml index 7280720d6..f6ce17622 100644 --- a/docs/release-notes/toc.yml +++ b/docs/release-notes/toc.yml @@ -3,3 +3,4 @@ toc: - file: known-issues.md - file: 9-0-0.md - file: 9-0-4.md + - file: 9-1-0.md