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 <balamuru@gmail.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user