{
  "schema_version": 2,
  "id": "operate/oss_and_stack/stack-with-enterprise/search/search-active-active",
  "title": "Search and query Active-Active databases",
  "url": "https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/search/search-active-active/",
  "summary": "Search and query Active-Active databases.",
  "tags": [
    "docs",
    "operate",
    "stack"
  ],
  "last_updated": "2026-10-06T08:53:14-07:00",
  "page_type": "content",
  "content_hash": "63cc5848e855a6730b8cf93190812bd1acb42d4412ef4c0a1278d309cda66908",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Starting with RediSearch 2.x, supported in Redis Software (RS) 6.0 and later, you can [enable Redis Search](https://redis.io/docs/latest/operate/rs/installing-upgrading/modules/add-module-to-database) for [Active-Active databases](https://redis.io/docs/latest/operate/rs/databases/active-active) at the time of creation.\n\nYou can run search operations on any instance of an Active-Active database."
    },
    {
      "id": "how-it-works",
      "title": "How it works",
      "role": "content",
      "text": "1. Create an Active-Active database with RediSearch 2.x enabled. Active-Active databases created with or upgraded to Redis version 8 or later automatically enable Redis Search.\n1. [Create the index](https://redis.io/docs/latest/commands/ft.create) on each instance of the database.\n1. If you are using [synonyms](https://redis.io/docs/latest/develop/ai/search-and-query/advanced-concepts/synonyms), you need to add them to each replica.\n1. The index is maintained by each instance outside of the database keyspace, so only updates to the hashes in the databases are synchronized."
    },
    {
      "id": "command-compatibility",
      "title": "Command compatibility",
      "role": "syntax",
      "text": "Active-Active databases do not support the following Redis Search commands: \n\n- [`FT.SUGADD`](https://redis.io/docs/latest/commands/ft.sugadd)\n- [`FT.SUGGET`](https://redis.io/docs/latest/commands/ft.sugget)\n- [`FT.SUGDEL`](https://redis.io/docs/latest/commands/ft.sugdel)\n- [`FT.SUGLEN`](https://redis.io/docs/latest/commands/ft.suglen)"
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "Here's an example to help visualize Active-Active Redis Search:\n\n| Time  | Description | CRDB Instance1 | Redis Search Instance 1 | CRDB Instance 2 | Redis Search Instance 2 |\n| :---: | :--- | :--- | :--- | :--- | :--- |\n|  t0 | Create the index on each instance |  | FT.CREATE idx .... |  | FT.CREATE idx .... |\n|  t1 | Add doc1 as a hash on instance 1; Redis Search indexes doc1 on instance 1 | HSET doc1 field1 \"a\" | (Index doc1 field1 \"a\") |  |  |\n|  t2 | Add doc2 as a hash on instance 2; Redis Search indexes doc2 on instance 2 |  |  | HSET doc1 field2 \"b\" | (Index doc1 field2 \"b\") |\n|  t3 | Searching for \"a\" in each instance only finds the result in instance 1 |  | FT.Search idx \"a\"<br/>1) 1<br/>2) doc1 |  | FT.Search idx \"a\"<br/>1) 0 |\n|  t4 | Active-Active synchronization | - Sync - |  | - Sync - |  |\n|  t5 | Both hashes are found in each instance | HGETALL doc1<br/>1) \"field2\"<br/>2) \"b\"<br/>3) \"field1\"<br/>4) \"a\" |  | HGETALL doc1<br/>1) \"field2\"<br/>2) \"b\"<br/>3) \"field1\"<br/>4) \"a\" |  |\n|  t6 | Searching for \"a\" in each instance finds both documents |  | FT.Search idx \"a\"<br/>1) 1<br/>2) doc1 |  | FT.Search idx \"a\"<br/>1) 1<br/>2) doc1 |\n\nThe practical result is that you have a geo-distributed database with a high level of consistency that can also run search operations on any instance."
    }
  ],
  "examples": []
}
