
Redis Query Engine
Define Redis Query Engine indexes and run FT.SEARCH / FT.AGGREGATE with DIALECT 2 while you ship search or catalog features on Redis.
Overview
redis-query-engine is an agent skill for the Build phase that teaches Redis Query Engine index schemas and FT.SEARCH / FT.AGGREGATE queries with DIALECT 2.
Install
npx skills add https://github.com/redis/agent-skills --skill redis-query-engineWhat is this skill?
- Covers Redis Query Engine (RQE): FT.CREATE schema design, FT.SEARCH, and FT.AGGREGATE patterns
- Requires DIALECT 2 for consistent parsing, NULL handling, and vector search compatibility
- Documents field types and query syntax aligned with modern clients (e.g. redis-py 6.0+ defaulting to DIALECT 2)
- Notes zero-downtime index update considerations for production Redis search workloads
- Contrasts deprecated dialects 1, 3, and 4 versus DIALECT 2 as of Redis 8
- DIALECT 2 is required for vector search queries per the skill guidance
- Query dialects 1, 3, and 4 are deprecated as of Redis 8
- redis-py 6.0+ defaults to DIALECT 2
Adoption & trust: 1 installs on skills.sh; 70 GitHub stars; trending (+100% hot-view momentum).
What problem does it solve?
You need Redis-native search and aggregations but FT syntax, field types, and dialect defaults are easy to get wrong and break queries in production.
Who is it for?
Indie backends adding product search, faceted filters, or rollups on Redis already in the stack.
Skip if: Teams with no Redis deployment, or apps that only need simple GET/SET without secondary indexes or RediSearch-style modules.
When should I use this skill?
You are implementing or debugging Redis Query Engine indexes, FT.SEARCH, or FT.AGGREGATE and need DIALECT 2–correct syntax and field typing.
What do I get? / Deliverables
You leave with DIALECT-2-correct index and query patterns you can drop into app code or redis-cli, ready to wire into your service layer or load tests.
- FT.CREATE index schema definitions with appropriate field types
- FT.SEARCH and FT.AGGREGATE command or client code using DIALECT 2
Recommended Skills
Journey fit
Canonical shelf is Build because the skill teaches FT.CREATE schemas, search syntax, and indexing patterns you implement in the product backend—not distribution or ops runbooks alone. Backend fits data-layer work: secondary indexes, field types, and query dialect behavior attached to application services using Redis.
How it compares
Use this skill package for Redis FT index and query recipes—not a hosted MCP search connector or a generic SQL ORM assistant.
Common Questions / FAQ
Who is redis-query-engine for?
Solo and indie builders implementing search or analytics on Redis Query Engine who want agent-guided FT.CREATE, FT.SEARCH, and FT.AGGREGATE workflows with DIALECT 2.
When should I use redis-query-engine?
Use it during Build when you are defining index schemas, writing search or aggregate queries, or migrating off older Redis query dialects before Redis 8 deprecations bite.
Is redis-query-engine safe to install?
It is documentation-style procedural knowledge from the Redis agent-skills repo; review the Security Audits panel on this Prism page and your org policy before pointing agents at production Redis credentials.
SKILL.md
READMESKILL.md - Redis Query Engine
{ "name": "redis-query-engine", "version": "1.0.0", "description": "Redis Query Engine (RQE) — FT.CREATE schema, FT.SEARCH / FT.AGGREGATE, DIALECT 2, field types, zero-downtime updates.", "author": { "name": "Redis", "email": "support@redis.com" }, "homepage": "https://redis.io", "repository": "https://github.com/redis/agent-skills", "license": "MIT", "keywords": ["redis", "search", "query-engine", "ft-create", "ft-search", "indexing"] } # Use DIALECT 2 for Query Syntax Use DIALECT 2 for consistent query behavior. Many Redis client libraries now default to DIALECT 2, and other dialects (1, 3, 4) are deprecated as of Redis 8. **Correct:** Use DIALECT 2 explicitly or rely on modern client defaults. ```python from redis import Redis r = Redis() # Modern redis-py (6.0+) defaults to DIALECT 2 # You can also set it explicitly results = r.ft("idx:products").search( "@name:laptop", dialect=2 ) ``` ``` # In raw commands, specify DIALECT 2 FT.SEARCH idx:products "@name:laptop" DIALECT 2 FT.AGGREGATE idx:products "@category:{electronics}" GROUPBY 1 @category REDUCE COUNT 0 AS count DIALECT 2 ``` **Note:** DIALECT 2 is required for vector search queries. Most modern client libraries (redis-py 6.0+, go-redis, Lettuce) now use DIALECT 2 by default. **Why DIALECT 2:** - Consistent handling of special characters - Better NULL value handling - More predictable query parsing - Required for vector search Reference: [Query Dialects](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/dialects/) # Choose the Correct Field Type Each field type has different capabilities and performance characteristics. | Field Type | Use When | Notes | |------------|----------|-------| | TEXT | Full-text search needed | Tokenized, stemmed | | TAG | Exact match, filtering | Faster than TEXT for filtering | | NUMERIC | Range queries, sorting | Use for prices, counts, timestamps | | GEO | Point location queries | Lat/long coordinates (single points) | | GEOSHAPE | Area/region queries | Polygons, circles, rectangles | | VECTOR | Similarity search | HNSW or FLAT algorithm | **Correct:** Use TAG for exact matching. ``` # Good: TAG for exact category matching FT.CREATE idx:products ON HASH PREFIX 1 product: SCHEMA category TAG SORTABLE status TAG ``` **Java** (Jedis): ```java import redis.clients.jedis.search.*; Schema schema = new Schema() .addTextField("name", 1) .addTagField("categories"); // TAG for exact matching IndexDefinition def = new IndexDefinition(IndexDefinition.Type.HASH); jedis.ftCreate("idx", IndexOptions.defaultOptions().setDefinition(def), schema); // Query with TAG syntax SearchResult result = jedis.ftSearch("idx", "@categories:{chef|runner}"); ``` **Incorrect:** Using TEXT when you don't need full-text features. ``` # Overkill: TEXT for category adds unnecessary tokenization FT.CREATE idx:products ON HASH PREFIX 1 product: SCHEMA category TEXT status TEXT ``` **Java** (Jedis): ```java // Bad: TEXT for categories adds unnecessary overhead Schema schema = new Schema() .addTextField("name", 1) .addTextField("categories", 1); // Overkill for exact matching ``` **Correct:** Use GEO for points, GEOSHAPE for areas. ``` # GEO for point locations (stores, users) FT.CREATE idx:stores ON HASH PREFIX 1 store: SCHEMA location GEO # GEOSHAPE for areas (delivery zones, boundaries) FT.CREATE idx:zones ON JSON PREFIX 1 zone: SCHEMA $.boundary AS boundary GEOSHAPE ``` Reference: [Redis Search Field Types](https://redis.io/docs/latest/develop/interact/search-and-query/indexing/geoindex/) # Index Only Fields You Query Create indexes with only the fields you need to search, filter, or sort on. **Correct:** Index specific fields and use prefixes. ``` FT.CREATE idx:products ON HASH PREFIX 1 product: SCHEMA name TEXT WEIGHT 2.0 description TEXT category TAG SO