Skip to content

Commit 499e8ba

Browse files
authored
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 <[email protected]>
1 parent 5b2f5ee commit 499e8ba

File tree

1 file changed

+3
-3
lines changed
  • spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs

1 file changed

+3
-3
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs/neo4j.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ spring:
100100
initialize-schema: true
101101
database-name: neo4j
102102
index-name: custom-index
103-
dimensions: 1536
103+
embedding-dimension: 1536
104104
distance-type: cosine
105105
----
106106

@@ -124,7 +124,7 @@ Properties starting with `spring.ai.vectorstore.neo4j.*` are used to configure t
124124
|`spring.ai.vectorstore.neo4j.initialize-schema`| Whether to initialize the required schema | `false`
125125
|`spring.ai.vectorstore.neo4j.database-name` | The name of the Neo4j database to use | `neo4j`
126126
|`spring.ai.vectorstore.neo4j.index-name` | The name of the index to store the vectors | `spring-ai-document-index`
127-
|`spring.ai.vectorstore.neo4j.dimensions` | The number of dimensions in the vector | `1536`
127+
|`spring.ai.vectorstore.neo4j.embedding-dimension` | The number of dimensions in the vector | `1536`
128128
|`spring.ai.vectorstore.neo4j.distance-type` | The distance function to use | `cosine`
129129
|`spring.ai.vectorstore.neo4j.label` | The label used for document nodes | `Document`
130130
|`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) {
179179
return Neo4jVectorStore.builder(driver, embeddingModel)
180180
.databaseName("neo4j") // Optional: defaults to "neo4j"
181181
.distanceType(Neo4jDistanceType.COSINE) // Optional: defaults to COSINE
182-
.dimensions(1536) // Optional: defaults to 1536
182+
.embeddingDimension(1536) // Optional: defaults to 1536
183183
.label("Document") // Optional: defaults to "Document"
184184
.embeddingProperty("embedding") // Optional: defaults to "embedding"
185185
.indexName("custom-index") // Optional: defaults to "spring-ai-document-index"

0 commit comments

Comments
 (0)