{
  "id": "search-tutorial",
  "title": "Redis Search tutorial",
  "url": "https://redis.io/docs/latest/develop/get-started/search-tutorial/",
  "summary": "A guided, end-to-end tour of Redis Search, from data modeling to vector and hybrid search.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-08-03T12:11:45-07:00",
  "children": [
    {
      "id": "data-modeling",
      "summary": "Learn how to store records in Redis so they can be searched, and when to choose hashes versus JSON documents.",
      "title": "Data modeling for search",
      "url": "https://redis.io/docs/latest/develop/get-started/search-tutorial/data-modeling/"
    },
    {
      "id": "indexing",
      "summary": "Create a search index over your JSON documents with FT.CREATE, choose the right field types, and understand how Redis indexes arrays.",
      "title": "Create an index",
      "url": "https://redis.io/docs/latest/develop/get-started/search-tutorial/indexing/"
    },
    {
      "id": "search",
      "summary": "Use FT.SEARCH to find documents by full text, tags, and numeric ranges, and to return only the fields you want.",
      "title": "Search and filter your data",
      "url": "https://redis.io/docs/latest/develop/get-started/search-tutorial/search/"
    },
    {
      "id": "aggregation",
      "summary": "Use FT.AGGREGATE to group, summarize, and transform your data with GROUPBY, REDUCE, and APPLY.",
      "title": "Aggregate your data",
      "url": "https://redis.io/docs/latest/develop/get-started/search-tutorial/aggregation/"
    },
    {
      "id": "vector-search",
      "summary": "Search by meaning with vector embeddings, run KNN queries with FT.SEARCH, and combine keywords with semantic similarity using FT.HYBRID.",
      "title": "Vector and hybrid search",
      "url": "https://redis.io/docs/latest/develop/get-started/search-tutorial/vector-search/"
    }
  ],
  "page_type": "content",
  "content_hash": "ffdc43bdb3a238bce24a8d9fb7b1079f92735e02a96dbe468509fa2a2951b93a",
  "sections": [
    {
      "id": "the-example-a-product-catalog",
      "title": "The example: a product catalog",
      "role": "content",
      "text": "Throughout the tutorial you will work with a small **online store catalog**. Each record is a product with a name, brand, category, free-text description, price, customer rating, and other attributes:\n\n[code example]\n\nThis kind of data is a good fit for search because people want to query it in many different ways: by keyword (\"wireless headphones\"), by filter (under $100, in the Audio category), by summary (average price per category), and increasingly by meaning (\"something for listening to music on a run\")."
    },
    {
      "id": "prerequisites",
      "title": "Prerequisites",
      "role": "content",
      "text": "You need a running Redis instance that includes Redis Search and the JSON data type. The easiest options are:\n\n- **Redis Cloud** &mdash; create a [free account](https://redis.io/try-free/). A free database comes with all the Redis Open Source features, including Redis Search and JSON.\n- **Local install** &mdash; follow the [install guide](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/) to run Redis Open Source on your own machine.\n\n\nThe vector and hybrid search examples in the [last step](https://redis.io/docs/latest/develop/get-started/search-tutorial/vector-search) use features that require Redis 8.8 or later. The earlier steps work on any recent version of Redis with Redis Search."
    },
    {
      "id": "choose-your-tool",
      "title": "Choose your tool",
      "role": "content",
      "text": "You can follow along using whichever tool you prefer. Every example in this tutorial is shown for each of them:\n\n- **`redis-cli`** &mdash; the command-line client included with Redis. It is the quickest way to try commands and see raw results. This is the default tab in every code example.\n- **[Redis Insight](https://redis.io/docs/latest/develop/tools/insight)** &mdash; a free graphical tool for Redis. Its [Search workspace](https://redis.io/docs/latest/develop/tools/insight/search-workspace) lets you browse indexes and run full-text, vector, and hybrid queries in a schema-aware editor. If you prefer to see your data and results visually, this is a great choice.\n- **A client library** &mdash; for real applications you will use Redis from your programming language of choice. Each example includes tabs for languages such as Python and Node.js.\n\nThroughout the tutorial, look for **\"Try it in Redis Insight\"** tips that show how to run the same query in the graphical editor."
    },
    {
      "id": "connect",
      "title": "Connect",
      "role": "content",
      "text": "First, connect to your Redis database. The following example connects with `redis-cli` to a server running on `localhost` (`-h 127.0.0.1`) and listening on the default port (`-p 6379`):\n\nFoundational: Connect to a Redis server with redis-cli using host and port parameters\n\n**Difficulty:** Beginner\n\n**Commands:** REDIS-CLI\n\n**Available in:** Redis CLI, Python\n\n##### Redis CLI\n\n[code example]\n\n##### Python\n\n[code example]\n\n\n\n<br/>\n\nIf you are using Redis Cloud, copy the connection details from your database's configuration page. A Cloud connection string has the form `host:port`, for example `redis-16379.c283.us-east-1-4.ec2.cloud.redislabs.com:16379`. You also need the database username and password, which you can pass to your client or supply with the [AUTH command](https://redis.io/docs/latest/commands/auth) after connecting."
    },
    {
      "id": "next-steps",
      "title": "Next steps",
      "role": "content",
      "text": "Ready to begin? Start with [data modeling](https://redis.io/docs/latest/develop/get-started/search-tutorial/data-modeling) to learn how to store your records so Redis can search them."
    }
  ],
  "examples": [
    {
      "id": "the-example-a-product-catalog-ex0",
      "language": "json",
      "code": "{\n  \"name\": \"Aurora AcousticPro Headphones\",\n  \"brand\": \"Aurora\",\n  \"category\": \"Audio\",\n  \"description\": \"Over-ear wireless headphones with active noise cancelling ...\",\n  \"price\": 199.99,\n  \"rating\": 4.6,\n  \"review_count\": 1284,\n  \"stock\": 42,\n  \"release_year\": 2024,\n  \"features\": [\"wireless\", \"noise-cancelling\", \"bluetooth\", \"over-ear\"]\n}",
      "section_id": "the-example-a-product-catalog"
    },
    {
      "id": "connect-ex0",
      "language": "plaintext",
      "code": "> redis-cli -h 127.0.0.1 -p 6379",
      "section_id": "connect"
    },
    {
      "id": "connect-ex1",
      "language": "python",
      "code": "r = redis.Redis(host=\"localhost\", port=6379, db=0, decode_responses=True)",
      "section_id": "connect"
    }
  ]
}
