Skip to content

Commit 348f3df

Browse files
committed
Upgrade notes for vector store delete API breaking change
Signed-off-by: Soby Chacko <[email protected]>
1 parent a36a987 commit 348f3df

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/upgrade-notes.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,27 @@ Spring AI updates to use Spring Boot 3.4.2 for the dependency management. You ca
6464
* If you are upgrading to Spring Boot 3.4.2, please make sure to refer to https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes#upgrading-from-spring-boot-33[this] documentation for the changes required to configure the REST Client. Notably, if you don’t have an HTTP client library on the classpath, this will likely result in the use of `JdkClientHttpRequestFactory` where `SimpleClientHttpRequestFactory` would have been used previously. To switch to use `SimpleClientHttpRequestFactory`, you need to set `spring.http.client.factory=simple`.
6565
* If you are using a different version of Spring Boot (say Spring Boot 3.3.x) and need a specific version of a dependency, you can override it in your build configuration.
6666

67+
=== Vector Store API changes
68+
69+
In version 1.0.0-M6, the `delete` method in the `VectorStore` interface has been modified to be a void operation instead of returning an `Optional<Boolean>`.
70+
If your code previously checked the return value of the delete operation, you'll need to remove this check.
71+
The operation now throws an exception if the deletion fails, providing more direct error handling.
72+
73+
==== Before 1.0.0-M6:
74+
[source,java]
75+
----
76+
Optional<Boolean> result = vectorStore.delete(ids);
77+
if (result.isPresent() && result.get()) {
78+
// handle successful deletion
79+
}
80+
----
81+
82+
==== In 1.0.0-M6 and later:
83+
[source,java]
84+
----
85+
vectorStore.delete(ids);
86+
// deletion successful if no exception is thrown
87+
----
6788

6889
== Upgrading to 1.0.0.M5
6990

0 commit comments

Comments
 (0)