valkey-search
valkey-search is a C++ module which extends valkey with vector search and secondary indexing capabilities. It enables users to index and query data stored in Valkey using complex queries with filters while maintaining high performance and scalability.
Valkey Search
A C plus plus Valkey module that adds vector search and secondary indexing, including hybrid queries, for AI, search, analytics and recommendation workloads.
Capabilities
Valkey Search is a BSD-3-Clause module that extends Valkey with search and indexing. It lets users create indexes and run searches with complex filters over data stored either as Valkey Hash or Valkey JSON types. Vector queries support approximate nearest neighbor search with HNSW and exact matching with K nearest neighbors. Beyond vectors it provides secondary indexing for numeric, tag and full text fields, and it exposes commands including FT.CREATE, FT.DROPINDEX, FT.INFO, FT._LIST, FT.SEARCH and FT.AGGREGATE, with a command reference and quick start guide linked from the README.
Performance and scaling
The module is built for high throughput workloads and claims single digit millisecond latency, high queries per second, and the ability to handle billions of vectors with over ninety nine percent recall on vector searches. Performance comes from keeping vectors in memory and applying optimizations across the stack: a threading model with lock free execution on the read path, design choices that promote CPU cache efficiency, and SIMD instructions for vector processing. It runs in both standalone and cluster modes, with query and ingestion scaling linearly with CPU cores, and cluster mode allowing horizontal scaling of the keyspace. Replicas can serve reads for horizontal query scaling if replica lag is acceptable.
Operational details
Hybrid queries combine vector similarity with filtering on numeric, tag or text indexes. The module uses a query planner that picks between pre filtering, where the dataset is filtered before an exact similarity search, and inline filtering, where results are filtered during the similarity search, choosing the more efficient path. An operational feature lets indexes skip loading from RDB on startup so a corrupted or inconsistent index can be rebuilt by a backfill process while non vector indexes keep working, which also reclaims memory from deleted vectors. Building requires GCC, with the module loaded via valkey-server --loadmodule and a non modifiable config supplied at load time.
Editorial conclusion
Valkey Search is BSD-3-Clause licensed and reported one hundred forty stars at indexing, with a build that requires GCC and the Ubuntu or Debian dev packages listed in the README.
Community notes