From 499e8baae50f7bcbd54f675f91b922a19d0842f0 Mon Sep 17 00:00:00 2001 From: Vinay Balamuru Date: Fri, 9 May 2025 04:10:41 -0500 Subject: [PATCH] Update neo4j.adoc (#3056) Update the documentation of spring property from `spring.ai.vectorstore.neo4j.dimensions` to `spring.ai.vectorstore.neo4j.embedding-dimension` to reflect what the code reads. Without this change, changes to the property `dimensions` are not propagated to runtime code, resulting in discrepancies if an embedding model that has a different number of dimensions is used Signed-off-by: Vinay Balamuru --- .../main/antora/modules/ROOT/pages/api/vectordbs/neo4j.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs/neo4j.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs/neo4j.adoc index 77a8b4393..7126841d8 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs/neo4j.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs/neo4j.adoc @@ -100,7 +100,7 @@ spring: initialize-schema: true database-name: neo4j index-name: custom-index - dimensions: 1536 + embedding-dimension: 1536 distance-type: cosine ---- @@ -124,7 +124,7 @@ Properties starting with `spring.ai.vectorstore.neo4j.*` are used to configure t |`spring.ai.vectorstore.neo4j.initialize-schema`| Whether to initialize the required schema | `false` |`spring.ai.vectorstore.neo4j.database-name` | The name of the Neo4j database to use | `neo4j` |`spring.ai.vectorstore.neo4j.index-name` | The name of the index to store the vectors | `spring-ai-document-index` -|`spring.ai.vectorstore.neo4j.dimensions` | The number of dimensions in the vector | `1536` +|`spring.ai.vectorstore.neo4j.embedding-dimension` | The number of dimensions in the vector | `1536` |`spring.ai.vectorstore.neo4j.distance-type` | The distance function to use | `cosine` |`spring.ai.vectorstore.neo4j.label` | The label used for document nodes | `Document` |`spring.ai.vectorstore.neo4j.embedding-property` | The property name used to store embeddings | `embedding` @@ -179,7 +179,7 @@ public VectorStore vectorStore(Driver driver, EmbeddingModel embeddingModel) { return Neo4jVectorStore.builder(driver, embeddingModel) .databaseName("neo4j") // Optional: defaults to "neo4j" .distanceType(Neo4jDistanceType.COSINE) // Optional: defaults to COSINE - .dimensions(1536) // Optional: defaults to 1536 + .embeddingDimension(1536) // Optional: defaults to 1536 .label("Document") // Optional: defaults to "Document" .embeddingProperty("embedding") // Optional: defaults to "embedding" .indexName("custom-index") // Optional: defaults to "spring-ai-document-index"