You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add tests for NOT, ISNULL, and ISNOTNULL filter expressions and the
null-metadata vector case in S3VectorStoreTests.
Fix incorrect filter format example in the S3 Vector Store reference
documentation and add a section documenting filter-based deletion.
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
You can also delete documents by filter expression:
135
+
136
+
[source,java]
137
+
----
138
+
vectorStore.delete("country in ['UK', 'NL'] && year >= 2020");
139
+
----
140
+
141
+
or programmatically:
142
+
143
+
[source,java]
144
+
----
145
+
FilterExpressionBuilder b = new FilterExpressionBuilder();
146
+
147
+
vectorStore.delete(b.and(
148
+
b.in("country", "UK", "NL"),
149
+
b.gte("year", 2020)).build());
150
+
----
151
+
152
+
NOTE: S3 Vectors does not provide a server-side filter-delete API.
153
+
Filter-based deletion lists all vectors in the index (paginated, 500 per page) and evaluates the filter expression locally.
154
+
For large indexes this operation is proportional to the total number of stored vectors.
155
+
132
156
== Manual Configuration
133
157
134
158
Instead of using the Spring Boot auto-configuration, you can manually configure the S3 Vector Store. For this you need to add the `spring-ai-s3-vector-store` to your project:
Copy file name to clipboardExpand all lines: vector-stores/spring-ai-s3-vector-store/src/main/java/org/springframework/ai/vectorstore/s3/S3VectorStoreFilterExpressionEvaluator.java
0 commit comments