Maven Central
ragleap-vectorstores (Java port)
version 0.1.0 · Java 21
Extra vector backends for the VectorBackend interface of ragleap-rag, for JVM teams: OpenSearch, Upstash Vector and Redis Stack (RediSearch). Each one talks to its store directly, with no vendor SDK. Not ported: Chroma and LanceDB.
<dependency> <groupId>io.github.antonyrag</groupId> <artifactId>ragleap-vectorstores</artifactId> <version>0.1.0</version> </dependency>
Highlights
- OpenSearch: k-NN search over its REST API. TLS certificates are verified by default. A metadata filter on a key from the chunk’s own metadata matches nothing, as in the Python version (confirmed live)
- Upstash Vector: REST API with a local SQLite document registry. The index must already exist as a pure dense index (create it in the Upstash console). No retry on connection failures, and a 30 s timeout. Deleting by the prefix
<id>:can collide for ids that contain a colon, as in Python - Redis Stack / RediSearch: a small built-in RESP2 client with a local SQLite document registry. Only
document_idcan be filtered, and an existing index is reused without a dimension check - Failures surface as
SQLException, and a list or map filter value throws
Verification
- Recorded-request parity against the real Python backends and their real client libraries (ragleap-vectorstores 0.6.0): OpenSearch 29 scenarios (61 requests), Upstash 42 scenarios (88 requests; 40 compared in the loop, one by a raw-socket test, one skipped because Python’s own HTTP client rejects it) and Redis 25 scenarios (75 commands, compared byte for byte)
- Deliberate breaks of the Java code, all caught by the tests: 10 (OpenSearch), 21 (Upstash) and 18 (Redis)
- Live checks, one round trip each against a throwaway container: Redis against Redis Stack 7.4.7 and OpenSearch against OpenSearch 3.9.0
- The published jar was smoke-tested from Maven Central in a clean project
Not live-verified
- Upstash (it needs a cloud account) and other versions of Redis Stack and OpenSearch
- The OpenSearch security plugin, TLS and authentication; connection pooling and TLS for the built-in Redis client
- The README snippets are marked “not compiled”: check names against the ragleap-rag javadoc
Not ported yet
- Chroma and LanceDB (no practical pure-Java path)
Tech stack
Requires Java 21. ragleap-rag 0.13.0 comes in as a dependency.
Testing
28 @Test and @ParameterizedTest methods across 8 test files, counted directly from the repo. The 0.1.0 tag and the main branch had the same counts when checked on 2026-10-30; main may move ahead. See the per-file list.