Add vector-stores module: one dataset through VectorStore on pgvector, Redis, Qdrant and Elasticsearch
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JXVi2GMQ7bR5EmbUFdDj7N
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Not compiled by the build (it lives outside src/main and src/test). scripts/capture-1x-compile.sh
|
||||
// compiles it against Spring AI 2.0.1 and captures the compiler's own message.
|
||||
import org.springframework.ai.embedding.EmbeddingModel;
|
||||
import org.springframework.ai.vectorstore.redis.RedisVectorStore;
|
||||
import redis.clients.jedis.JedisPooled;
|
||||
|
||||
class Redis1xStyle {
|
||||
RedisVectorStore build(EmbeddingModel em) {
|
||||
JedisPooled jedis = new JedisPooled("127.0.0.1", 6392);
|
||||
return RedisVectorStore.builder(jedis, em)
|
||||
.vectorAlgorithm(RedisVectorStore.Algorithm.HSNW)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user