CrossClusterSearch and Aliases

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?

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

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

Thanks!

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