█

AI/TLDR

Buy me a coffee
Buy me a coffee

RediSearch

The query and indexing engine that turns Redis into a vector and full-text search database

Vector DatabasesOpen source
Language
Rust
License
RSALv2 / SSPLv1 / AGPLv3 (tri-licensed)
IN SHORT

What is RediSearch?

RediSearch is the engine that gives Redis a query layer. It sits in the Vector Databases category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Rust and licensed RSALv2 / SSPLv1 / AGPLv3 (tri-licensed). To get started: connect to a Redis instance.

Overview

RediSearch is the engine that gives Redis a query layer. Instead of fetching values by key, you declare an index over a key prefix and then ask questions of the data: match words in a description, filter a category to an exact tag, bound a price to a numeric range, or find the nearest vectors to an embedding. Redis keeps the index current automatically as documents are written.

It is distributed as the Redis Query Engine rather than as a separate install. Starting with Redis 8 the engine is integral to Redis, and the project no longer ships standalone module releases — the repository exists for the source, the release notes and the maintenance branches of the older 2.x lines. In practice you get it by running Redis Open Source, Redis Software or Redis Cloud, all three of which include it.

For AI work the draw is that one system holds both the vectors and everything you would otherwise filter on separately. A `VECTOR` field sits in the same schema as `TEXT`, `TAG` and `NUMERIC` fields, so a KNN query can be constrained by category and price in the same expression, and the aggregation engine can summarise the results. Indexes are compressed inverted indexes, giving fast lookups at a low memory footprint, and a distributed version that scales across hundreds of servers is available through Redis Enterprise Software and Redis Cloud.

What it does

  • Secondary indexes over Redis hashes (ON HASH) and JSON documents (ON JSON), selected by key prefix and kept up to date incrementally
  • Vector similarity search — KNN, filtered KNN and range queries — alongside full-text, tag and numeric fields in one schema
  • Full-text search with BM25 ranking by default, field weighting, exact-phrase matching, prefix and fuzzy matching, and stemming in many languages
  • Numeric and geospatial filtering, geoshape indexing, and a powerful aggregations engine for grouped summaries
  • Auto-complete suggestions, double-metaphone phonetic matching, spelling correction and Chinese-language tokenization
  • A distributed cluster version scaling to billions of documents, available through Redis Cloud and Redis Enterprise Software

Getting started

You do not install RediSearch separately on Redis 8 or later — run Redis Open Source, Redis Software or Redis Cloud and the query engine is already there. These commands follow the official Redis Search tutorial's product-catalog example.

Connect to a Redis instance

Any recent Redis with Redis Search and the JSON data type will do; the vector and hybrid steps of the tutorial need Redis 8.8 or later.

bashbash
redis-cli -h 127.0.0.1 -p 6379

Store some JSON documents

Documents share a key prefix — here product: — which is what the index will select on.

texttext
JSON.SET product:1 $ '{"name":"Aurora AcousticPro Headphones","brand":"Aurora","category":"Audio","price":199.99,"rating":4.6,"features":["wireless","noise-cancelling","bluetooth"]}'

Create the index

FT.CREATE says what to index (PREFIX), the data type (ON JSON), and the schema: a JSONPath per field, an AS alias to query by, and a type. Note the [*] on the array field — without it, array elements are not indexed as separate tags.

texttext
FT.CREATE idx:catalog ON JSON PREFIX 1 product: SCHEMA $.name AS name TEXT $.brand AS brand TAG SORTABLE $.category AS category TAG $.description AS description TEXT $.price AS price NUMERIC SORTABLE $.rating AS rating NUMERIC SORTABLE $.features[*] AS features TAG

Query it

Text fields match by word with @field:term, tags match exactly with @field:{value}, numerics take a range as @field:[min max], and listing conditions together means AND.

texttext
FT.SEARCH idx:catalog "@name:headphones" RETURN 1 name
FT.SEARCH idx:catalog "@category:{Audio} @price:[0 100]" RETURN 2 name price
FT.SEARCH idx:catalog "*" SORTBY price DESC RETURN 2 name price LIMIT 0 3

Check the index

FT.INFO reports the schema and how many documents the index holds — look for num_docs.

texttext
FT.INFO idx:catalog

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Back a RAG pipeline with vector search that lives in the same store as the metadata you need to filter on, so a KNN query can be scoped by tenant, category or recency in one expression
  • Add full-text search and faceted filtering to an application that already runs Redis, without introducing a second search system
  • Use Redis as a document database over JSON, querying by JSONPath-mapped fields instead of fetching by key
  • Summarise indexed data in place with FT.AGGREGATE — counts, averages and totals per group — rather than pulling documents into the application

How RediSearch compares

RediSearch alongside other open-source vector databases tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Supabase★ 116kManaged Postgres backend whose Vector toolkit (pgvector) stores, indexes, and queries embeddings next to transactional data.
Redis Cloud★ 77.8kFully-managed Redis with built-in vector search, offering low-latency similarity and hybrid queries over any embeddings.
Milvus★ 46.8kA distributed vector database for storing and searching billions of embeddings at scale, with multiple index types and Kubernetes-native deployment.
FAISS★ 42kA library from Meta for efficient similarity search and clustering of dense vectors, with both exact and approximate indexes.
Qdrant★ 35.8kA Rust-based vector search engine that stores embeddings with rich payload filtering for semantic search and recommendation systems.
Chroma★ 29.8kA developer-focused vector database designed for quickly building retrieval and RAG features with a simple Python and JavaScript API.
pgvector★ 23.9kA PostgreSQL extension that adds a vector data type and similarity search so you can store and query embeddings inside an existing Postgres database.
RediSearch★ 6.2kThe query and indexing engine that turns Redis into a vector and full-text search database