All skills
redis avatar

/redis-search

@6f59bfc official
by redisredis/agent-skills163 stars
30

Redis Search guidance covering FT.CREATE schema design, field type selection (TEXT, TAG, NUMERIC, GEO, GEOSHAPE, VECTOR, JSON path), DIALECT 2 query syntax, FT.SEARCH / FT.AGGREGATE / FT.HYBRID command selection, vector similarity with HNSW or FLAT, hybrid retrieval combining lexical and vector ranking, RAG pipelines, zero-downtime index updates via aliases, and debugging with FT.PROFILE and FT.EXPLAIN. Use when defining a search index on Hash or JSON documents, writing FT.SEARCH queries with filters, sorting, aggregation, or vector KNN, tuning HNSW parameters, building a RAG retrieval pipeline, or troubleshooting slow or empty search results.

Use this Skill: https://skilld.dev/gh/redis/agent-skills/redis-search

This session only. Nothing lands on disk.

referencesdialect.md

≈665 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Use DIALECT 2 for Query Syntax

Pass DIALECT 2 on every FT.SEARCH / FT.AGGREGATE / FT.HYBRID call. From Redis 8 onward, DIALECT 2 is the only supported value — dialects 1, 3, and 4 are deprecated and removed in current Redis Open Source. Vector query attributes (the =>[KNN ...] form) require DIALECT 2 to parse.

Correct: Specify DIALECT 2 explicitly, or rely on modern client defaults.

# In raw commands, specify DIALECT 2 at the end
FT.SEARCH idx:bicycle "@model:hyperion" DIALECT 2

FT.AGGREGATE idx:bicycle "@type:{mountain}"
    GROUPBY 1 @brand
    REDUCE COUNT 0 AS bike_count
    DIALECT 2

Note on Redis 8 and DIALECT: Redis 8 (built-in Redis Search) accepts only DIALECT 2. The DEFAULT_DIALECT FT.CONFIG knob no longer accepts other values. Older Redis 7.x / RediSearch-module deployments still respect dialect 1; if you target both, set DIALECT 2 explicitly so behavior is identical across versions.

Why DIALECT 2:

  • Required for vector search (=>[KNN ...] attribute syntax).
  • Required for PARAMS placeholder binding.
  • Predictable handling of special characters and NULL-like missing fields.
  • The only dialect that will be supported going forward.

Incorrect: Relying on the server-side default with a client library that pins an older dialect.

# Bad: omitting DIALECT in a vector query with a legacy redis-py — falls back to DIALECT 1 and rejects =>[KNN ...]
FT.SEARCH idx:bicycle "*=>[KNN 10 @embedding $vec AS score]" PARAMS 2 vec "..."

Client mirrors

# redis-py — STEP_START dialect
# Mirrors doctests/search_quickstart.py
from redis import Redis
r = Redis()
# Modern redis-py defaults to DIALECT 2; set explicitly when in doubt
r.ft("idx:bicycle").search("@model:hyperion", dialect=2)
# STEP_END
// Jedis — STEP_START dialect
// Mirrors SearchQuickstartExample.java
import redis.clients.jedis.UnifiedJedis;
import redis.clients.jedis.search.FTSearchParams;
import redis.clients.jedis.search.SearchResult;

try (UnifiedJedis jedis = new UnifiedJedis("redis://localhost:6379")) {
    SearchResult res = jedis.ftSearch("idx:bicycle",
        "@model:hyperion",
        FTSearchParams.searchParams().dialect(2));
}
// STEP_END

Upstream sources

Source: SKILL.md on GitHub

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides technical guidance for using Redis Search, including schema design, query syntax, vector similarity, and RAG pipelines. It includes idiomatic code examples for official Python and Java client libraries. All external references are to official Redis documentation and repositories, and no malicious patterns were detected.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 6f59bfc. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 3 months ago
metadata
{
  "author": "Redis, Inc.",
  "version": "1.0.0"
}

README badge

README badge for redis/agent-skills/redis-search