Class RedisVectorStore.RedisVectorStoreConfig.Builder
java.lang.Object
org.springframework.ai.vectorstore.RedisVectorStore.RedisVectorStoreConfig.Builder
- Enclosing class:
RedisVectorStore.RedisVectorStoreConfig
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns the immutable configuration.withContentFieldName
(String name) Configures the Redis content field name to use.withEmbeddingFieldName
(String name) Configures the Redis embedding field name to use.withIndexName
(String name) Configures the Redis index name to use.withMetadataFields
(RedisVectorStore.MetadataField... fields) withPrefix
(String prefix) Configures the Redis key prefix to use (default: "embedding:").Configures the Redis URI to use.withVectorAlgorithm
(RedisVectorStore.Algorithm algorithm) Configures the Redis vector algorithmto use.
-
Method Details
-
withURI
Configures the Redis URI to use.- Parameters:
uri
- the Redis URI to use- Returns:
- this builder
-
withIndexName
Configures the Redis index name to use.- Parameters:
name
- the index name to use- Returns:
- this builder
-
withPrefix
Configures the Redis key prefix to use (default: "embedding:").- Parameters:
prefix
- the prefix to use- Returns:
- this builder
-
withContentFieldName
Configures the Redis content field name to use.- Parameters:
name
- the content field name to use- Returns:
- this builder
-
withEmbeddingFieldName
Configures the Redis embedding field name to use.- Parameters:
name
- the embedding field name to use- Returns:
- this builder
-
withVectorAlgorithm
public RedisVectorStore.RedisVectorStoreConfig.Builder withVectorAlgorithm(RedisVectorStore.Algorithm algorithm) Configures the Redis vector algorithmto use.- Parameters:
algorithm
- the vector algorithm to use- Returns:
- this builder
-
withMetadataFields
public RedisVectorStore.RedisVectorStoreConfig.Builder withMetadataFields(RedisVectorStore.MetadataField... fields) -
withMetadataFields
public RedisVectorStore.RedisVectorStoreConfig.Builder withMetadataFields(List<RedisVectorStore.MetadataField> fields) -
build
Returns the immutable configuration.- Returns:
- the immutable configuration
-