Skip to content

Commit b066870

Browse files
committed
Code cleanup: Neo4j vector store
- Remove batch strategy usage as it is taken care by the vector store parent builder Signed-off-by: Ilayaperumal Gopinathan <[email protected]>
1 parent 00b0aab commit b066870

File tree

1 file changed

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

1 file changed

+0
-12
lines changed

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

-12
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@
3030

3131
import org.springframework.ai.document.Document;
3232
import org.springframework.ai.document.DocumentMetadata;
33-
import org.springframework.ai.embedding.BatchingStrategy;
3433
import org.springframework.ai.embedding.EmbeddingModel;
3534
import org.springframework.ai.embedding.EmbeddingOptionsBuilder;
36-
import org.springframework.ai.embedding.TokenCountBatchingStrategy;
3735
import org.springframework.ai.observation.conventions.VectorStoreProvider;
3836
import org.springframework.ai.observation.conventions.VectorStoreSimilarityMetric;
3937
import org.springframework.ai.vectorstore.AbstractVectorStoreBuilder;
@@ -180,8 +178,6 @@ public class Neo4jVectorStore extends AbstractObservationVectorStore implements
180178

181179
private final boolean initializeSchema;
182180

183-
private final BatchingStrategy batchingStrategy;
184-
185181
protected Neo4jVectorStore(Builder builder) {
186182
super(builder);
187183

@@ -198,7 +194,6 @@ protected Neo4jVectorStore(Builder builder) {
198194
this.idProperty = SchemaNames.sanitize(builder.idProperty).orElseThrow();
199195
this.constraintName = SchemaNames.sanitize(builder.constraintName).orElseThrow();
200196
this.initializeSchema = builder.initializeSchema;
201-
this.batchingStrategy = new TokenCountBatchingStrategy();
202197
}
203198

204199
@Override
@@ -418,8 +413,6 @@ public static class Builder extends AbstractVectorStoreBuilder<Builder> {
418413

419414
private String constraintName = DEFAULT_CONSTRAINT_NAME;
420415

421-
private BatchingStrategy batchingStrategy = new TokenCountBatchingStrategy();
422-
423416
private boolean initializeSchema = false;
424417

425418
private Builder(Driver driver, EmbeddingModel embeddingModel) {
@@ -545,11 +538,6 @@ public Builder initializeSchema(boolean initializeSchema) {
545538
return this;
546539
}
547540

548-
public Builder batchingStrategy(BatchingStrategy batchingStrategy) {
549-
this.batchingStrategy = batchingStrategy;
550-
return this;
551-
}
552-
553541
@Override
554542
public Neo4jVectorStore build() {
555543
return new Neo4jVectorStore(this);

0 commit comments

Comments
 (0)