Skip to content

Commit b9ba625

Browse files
vbartacektzolov
authored andcommitted
Fix Neo4jVectorStore max allowed dimension size to 4096
- The Neo4j "vector-2.0" index provider allows up to 4096 dimensions. - Remove upper dimension boundry check
1 parent 9026263 commit b9ba625

File tree

1 file changed

+1
-2
lines changed
  • vector-stores/spring-ai-neo4j-store/src/main/java/org/springframework/ai/vectorstore

1 file changed

+1
-2
lines changed

vector-stores/spring-ai-neo4j-store/src/main/java/org/springframework/ai/vectorstore/Neo4jVectorStore.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ public Builder withDatabaseName(String databaseName) {
149149
*/
150150
public Builder withEmbeddingDimension(int newEmbeddingDimension) {
151151

152-
Assert.isTrue(newEmbeddingDimension >= 1 && newEmbeddingDimension <= 2048,
153-
"Dimension has to be withing the boundaries 1 and 2048 (inclusively)");
152+
Assert.isTrue(newEmbeddingDimension >= 1, "Dimension has to be positive.");
154153

155154
this.embeddingDimension = newEmbeddingDimension;
156155
return this;

0 commit comments

Comments
 (0)