redis-search

Design Redis Search indexes and write FT.SEARCH, FT.AGGREGATE, and vector queries.

Updated Jul 25, 2026
One-click install
npx skills add https://github.com/kaannakiin/turborepo_template --skill redis-search-kaannakiin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redis-search
Source: https://github.com/kaannakiin/turborepo_template/tree/main/.agents/skills/redis-search
Command: npx skills add https://github.com/kaannakiin/turborepo_template --skill redis-search-kaannakiin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Redis Search spans lexical, numeric, geo, JSON-path, and vector queries with subtle syntax rules, and mistakes like using TEXT instead of TAG, mismatching vector DIM, or omitting DIALECT 2 silently produce wrong or slow results. This Skill provides authoritative guidance for designing indexes, writing queries, and debugging search behavior. ## Core Features & Use Cases - Index and schema design: Choose the right field types (TEXT, TAG, NUMERIC, GEO, GEOSHAPE, VECTOR, JSON paths), tune FT.CREATE options, and manage zero-downtime schema updates via aliases. - Query authoring and optimization: Write FT.SEARCH, FT.AGGREGATE, and FT.HYBRID queries with filters, sorting, aggregation pipelines, vector KNN, and hybrid lexical-vector fusion. - RAG and vector retrieval: Configure HNSW vs FLAT indexes, match DIM and distance metrics to embedding models, and build retrieval pipelines with pre-filtering. - Use Case: You are building a product search where users filter by category and price while also ranking by semantic similarity to a query embedding. The Skill guides you to create a TAG + NUMERIC + VECTOR index and issue a pre-filtered KNN query with DIALECT 2. ## Quick Start Ask the AI to create a Redis Search index on product hashes with a category tag, sortable numeric price, and a 1536-dimension cosine vector field, then write a filtered KNN query against it.

Frequently Asked Questions about redis-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Redis Search index with FT.CREATE?

Use FT.CREATE with ON HASH or ON JSON, a PREFIX to limit which keys are indexed, and a SCHEMA listing fields with types like TEXT, TAG, NUMERIC, GEO, or VECTOR. Index only the fields you actually query, since every indexed field costs memory on each write.

Should I use TAG or TEXT fields in Redis Search?

Use TAG for exact-match filtering on values like categories, brands, or statuses, and TEXT only when you need full-text search with tokenization and stemming. TAG is roughly 10 times faster than TEXT for exact-match filters.

HNSW vs FLAT vector index in Redis, which should I choose?

Choose HNSW for production workloads over about 10k vectors where approximate results with 95%+ recall are acceptable. Choose FLAT for small datasets or when exact 100% recall is required, since it performs a brute-force linear scan.

Does Redis Search support hybrid lexical and vector queries?

Yes. Redis 8.4 and later provide FT.HYBRID, which runs a SEARCH leg and a VSIM leg and fuses rankings with RRF or LINEAR combination. On older versions, use FT.SEARCH with a pre-filter plus the KNN attribute syntax as an approximation.

Why does my Redis vector search return wrong or empty results?

The most common cause is a DIM, TYPE, or DISTANCE_METRIC mismatch between the index and the embedding model, which silently produces garbage. Also verify you pass DIALECT 2, and debug with FT.EXPLAIN, FT.PROFILE, and FT.INFO to inspect parsing and indexing failures.

How do I update a Redis Search index schema without downtime?

Build a new index alongside the old one, wait for FT.INFO to show percent_indexed at 1.0, then atomically swap with FT.ALIASUPDATE so applications keep querying a stable alias. FT.ALTER can only add fields; type or option changes require a rebuild.