What RedisVectorStore needs to reach one search index of a Redis server with the Redis Query Engine (Redis Stack, or Redis 8 and later), or of a Valkey server with the valkey-search module.
Load it from configuration with org.llm4s.config.RedisVectorStoreConfigLoader, which reads llm4s.vectorstore.redis, or build one in code:
val config = RedisConfig("redis.example.com")
.withTls(true)
.withPassword("secret")
.withIndex("docs")
The store checks it with RedisConfig#validate when it is built. toString never prints the password.
Value parameters
- algorithm
-
the vector index structure the index is created with
- database
-
the logical database (
SELECT); Redis Query Engine indexes only database 0 on most servers - dimensions
-
the vector size the index is created with; when unset, the size of the first record upserted. A record of another size is refused before it is sent.
- distanceMetric
-
the distance the index is created with
- host
-
the server's host name or address
- index
-
the search index's name (
FT.CREATE) - keyPrefix
-
the prefix of every record's hash key; unset means
"<index>:". Two stores must not share a prefix. - password
-
the password (
AUTH); unset means no authentication - port
-
the server's port
- timeout
-
how long connecting and each command may take
- tls
-
whether to connect over TLS. Without it the password crosses the network in clear text, which is acceptable only on a trusted network.
- username
-
the ACL user; unset means the
defaultuser
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any