# CCS requires wildcard after index name to search or always returns 404

**URL:** <https://discuss.elastic.co/t/ccs-requires-wildcard-after-index-name-to-search-or-always-returns-404/348091>\
**Category:** Elasticsearch\
**Tags:** ccs-cross-cluster-search\
**Created:** [November 27, 2023, 10:20pm UTC](https://discuss.elastic.co/t/ccs-requires-wildcard-after-index-name-to-search-or-always-returns-404/348091 "2023-11-27T22:20:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Doc\_Kaos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doc_kaos/32/53671_2.png) [@Doc\_Kaos](https://discuss.elastic.co/u/Doc_Kaos)\
**Post date:** [November 27, 2023, 10:20pm UTC](https://discuss.elastic.co/t/ccs-requires-wildcard-after-index-name-to-search-or-always-returns-404/348091/1 "2023-11-27T22:20:17Z")

</div>

Quick bit about the setup:  
Dedicated CCS cluster (no local indices, except for monitoring) v7.17.10  
Two clusters `clusterA` and `clusterB` are connected as remote clusters v7.4.1

All of these searches are performed on the CCS cluster:  
`GET /clusterA:index-alice-2023.11.26/_search` - Returns results as expected  
`GET /*:index-alice-2023.11.26/_search` - Returns:

```auto
{"error":
  {"root_cause":[
  {"type":"index_not_found_exception",
   "reason":"no such index [index-alice-2023.11.26]",
   "index_uuid":"_na_",
    "resource.type":"index_or_alias",
    "resource.id":"index-alice-2023.11.26",
     "index":"index-alice-2023.11.26"}
  ],
"type":"index_not_found_exception",
"reason":"no such index [index-alice-2023.11.26]",
"index_uuid":"_na_",
"resource.type":"index_or_alias",
"resource.id":"index-alice-2023.11.26",
"index":"index-alice-2023.11.26"
},"status":404}

```

`GET /*:index-alice-2023.11.26*/_search` - Note the additional wildcard on index name, this returns the results as expected ...

I can't think what is causing this. Remote settings are

```auto
{
  "clusterB" : {
    "connected" : true,
    "mode" : "sniff",
    "seeds" : [
      "seed.clusterB.com:9300"
    ],
    "num_nodes_connected" : 3,
    "max_connections_per_cluster" : 3,
    "initial_connect_timeout" : "30s",
    "skip_unavailable" : false
  },
  "clusterA" : {
    "connected" : true,
    "mode" : "sniff",
    "seeds" : [
      "seed.clusterA.com:9300"
    ],
    "num_nodes_connected" : 3,
    "max_connections_per_cluster" : 3,
    "initial_connect_timeout" : "30s",
    "skip_unavailable" : false
  }
}

```

---

<div class="post-metadata">

**Author:** ![Doc\_Kaos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doc_kaos/32/53671_2.png) [@Doc\_Kaos](https://discuss.elastic.co/u/Doc_Kaos)\
**Post date:** [November 28, 2023, 2:12pm UTC](https://discuss.elastic.co/t/ccs-requires-wildcard-after-index-name-to-search-or-always-returns-404/348091/2 "2023-11-28T14:12:31Z")

</div>

Seaching through queries from packetbeats, I see that almost every user is including `ignore_unavailable=true` in URL 😃 This makes sense now. And the wildcard is allowing it to work without that set.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 26, 2023, 2:13pm UTC](https://discuss.elastic.co/t/ccs-requires-wildcard-after-index-name-to-search-or-always-returns-404/348091/3 "2023-12-26T14:13:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
