# CrossClusterSearch and Aliases

**URL:** https://discuss.elastic.co/t/crossclustersearch-and-aliases/127863
**Category:** Elasticsearch
**Created:** [April 12, 2018, 7:40pm UTC](https://discuss.elastic.co/t/crossclustersearch-and-aliases/127863 "2018-04-12T19:40:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)
#### Post date: [April 12, 2018, 7:40pm UTC](https://discuss.elastic.co/t/crossclustersearch-and-aliases/127863/1 "2018-04-12T19:40:47Z")

</div>

I suspect the answer is no, but I can't find anything in the documentation to say yes or no.

The question is can you add a CCS in to an alias? like so:

```
 curl -XPOST 'hd1delk01lx:9205/_aliases?pretty' -H 'Content-Type: application/json' -d'
        {
            "actions" : [
                { "add" : { "index" : "nyc1:bay*", "alias" : "alias1" } }
            ]
 }
 '

```

Since I am getting the error of

```
{
  "error" : {
    "root_cause" : [
      {
        "type" : "index_not_found_exception",
        "reason" : "no such index",
        "index_uuid" : "_na_",
        "resource.type" : "index_or_alias",
        "resource.id" : "nyc1:bay*",
        "index" : "nyc1:bay*"
      }
    ],
    "type" : "index_not_found_exception",
    "reason" : "no such index",
    "index_uuid" : "_na_",
    "resource.type" : "index_or_alias",
    "resource.id" : "nyc1:bay*",
    "index" : "nyc1:bay*"
  },
  "status" : 404
}

```

or am I just doing it wrong?

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [April 14, 2018, 1:48am UTC](https://discuss.elastic.co/t/crossclustersearch-and-aliases/127863/2 "2018-04-14T01:48:51Z")

</div>

In the current implementation, aliases are attributes of indices. Each index has a set of settings, mapping and a list of aliases that this index is associated with. When an index is created, we register all aliases for this index, when an index is deleted, all its settings, mappings and aliases are deleted as well. It makes alias management pretty easy and straightforward, but this also means that if an index is not a part of a cluster, there is no way to associate an alias with it. I hope this makes sense. Please also see the discussion [here](https://github.com/elastic/elasticsearch/issues/29381)

---

<div class="post-metadata">

### Author: ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)
#### Post date: [April 17, 2018, 12:50pm UTC](https://discuss.elastic.co/t/crossclustersearch-and-aliases/127863/3 "2018-04-17T12:50:03Z")

</div>

Makes sense though does sound backwards but I did suspect it was not possible.

Thanks!

---

<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: [May 15, 2018, 12:50pm UTC](https://discuss.elastic.co/t/crossclustersearch-and-aliases/127863/4 "2018-05-15T12:50:11Z")

</div>

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