Delete alias


(mr_max) #1

Why When I remove alias, my index removed too?


(David Pilato) #2

No it's not. You are doing something else I think.


(mr_max) #3

Now I make index "portal" then i make request

/POST /_aliases
{
    "actions": [
         { "add":    { "index": "portal", "alias": "portal_v1" }}
    ]
}

and then i make request
/DELETE /portal_v1/

and my index portal removed too. why?


(mr_max) #4

if i have alias poral_v1,
i can't make request

/POST /_aliases
    {
        "actions": [
            { "add":    { "index": "portal", "alias": "portal_v1" }}
        ]
    }

i see

{
error: "InvalidAliasNameException[[portal] Invalid alias name [portal_v1], an index exists with the same name as the alias]"
status: 400
}

(David Pilato) #5

Read the doc on how to remove an alias: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html#indices-aliases


(mr_max) #6

I understood this theme, but when i reindex data to new index, my new index not save mapping old index, yes?


(David Pilato) #7

I don't understand.

What do you want to do?


(mr_max) #8

For example,
I make operations from article https://www.elastic.co/blog/changing-mapping-with-zero-downtime

and when i reindex data from my_index_v1 to my_index_v2, mappings of my_index_v1 doesn't move to my_index_v2.
understand?


(David Pilato) #9

So what do you want to do?

Reindex from one index to another one and change the mapping ?
Or keep the same mapping ? (if so, why do you want to reindex?)


(mr_max) #10

i want to, when i cope data from index1 to index2 all mapping from index1 was copied to index2.
it turns out if i want to move all mapings of index 1 to index 2, i must create these mappings on the index2 before reindex data?


(system) #11