Class Neo4jVectorStore.Neo4jVectorStoreConfig.Builder
java.lang.Object
org.springframework.ai.vectorstore.Neo4jVectorStore.Neo4jVectorStoreConfig.Builder
- Enclosing class:
- Neo4jVectorStore.Neo4jVectorStoreConfig
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns the immutable configuration.withDatabaseName
(String databaseName) Configures the Neo4j database name to use.withDistanceType
(Neo4jVectorStore.Neo4jDistanceType newDistanceType) Configures the distance type to store in the index and to use in queries.withEmbeddingDimension
(int newEmbeddingDimension) Configures the size of the embedding.withEmbeddingProperty
(String newEmbeddingProperty) Configures the property of the node to use for storing embedding.Configures the node label to use for storing documents.
-
Method Details
-
withDatabaseName
Configures the Neo4j database name to use. Leave null or blank to use the default database.- Parameters:
databaseName
- the database name to use- Returns:
- this builder
-
withEmbeddingDimension
public Neo4jVectorStore.Neo4jVectorStoreConfig.Builder withEmbeddingDimension(int newEmbeddingDimension) Configures the size of the embedding. Defaults to 1536, inline with OpenAIs embeddings.- Parameters:
newEmbeddingDimension
- The dimension of the embedding- Returns:
- this builder
-
withDistanceType
public Neo4jVectorStore.Neo4jVectorStoreConfig.Builder withDistanceType(Neo4jVectorStore.Neo4jDistanceType newDistanceType) Configures the distance type to store in the index and to use in queries.- Parameters:
newDistanceType
- The distance type, must not be null- Returns:
- this builder
-
withLabel
Configures the node label to use for storing documents. Defaults to Document.- Parameters:
newLabel
- The label used on the nodes representing the document- Returns:
- this builder
-
withEmbeddingProperty
public Neo4jVectorStore.Neo4jVectorStoreConfig.Builder withEmbeddingProperty(String newEmbeddingProperty) Configures the property of the node to use for storing embedding. Defaults to embedding.- Parameters:
newEmbeddingProperty
- The property of the nodes for storing the embedding- Returns:
- this builder
-
build
Returns the immutable configuration.- Returns:
- the immutable configuration
-