Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index Aliases #88

Closed
kimchy opened this issue Mar 24, 2010 · 2 comments
Closed

Index Aliases #88

kimchy opened this issue Mar 24, 2010 · 2 comments

Comments

@kimchy
Copy link
Member

kimchy commented Mar 24, 2010

Allow to define aliases to indices, and have all APIs support that. Here is a simple way to define the alias using the REST API (localhost:9200/_aliases):

{
    actions : [
        { add : { index : "test1", alias : "alias1" } }
    ]
}

In the above, we define an alias1 for index test1. In all operations, we can use alias1 instead of test1. The API also allows to remove an alias from an index, and better yet remove and then add an alias for an index:

{
    actions : [
        { remove : { index : "test1", alias : "alias1" } },
        { add : { index : "test1", alias : "alias2" } }
    ]
}

In the above example, we simple remove alias1 and add alias2 to test1 in a single, atomic operation.

Last, but not least, an alias can be assigned to more than one index. This applies to APIs that accept more than one index, such as search and count. Instead of specifying a list of indices, we can just alias them to the same alias, and use it. For example:

{
    actions : [
        { add : { index : "test1", alias : "alias1" } },
        { add : { index : "test1", alias : "alias2" } }
    ]
}

Ohh, and index aliases can be set when creating an index, here is a YAML example:

index:
    aliases : ["alias1", "alias2"]
@kimchy
Copy link
Member Author

kimchy commented Mar 25, 2010

Index Aliases, closed by 8f32467.

@stoned7
Copy link

stoned7 commented Mar 26, 2013

the yaml example, of creating alias during creation of index request, can you give me json post data of the same

rmuir pushed a commit to rmuir/elasticsearch that referenced this issue Nov 8, 2015
* exclude *StarndaloneTest*.class from test target
* add cleanup to MultifieldAttachementMapperTests for terminating ThreadPool
* Modify MapperTestUtils.newMapperService for adding ThreadPool

Closes elastic#88
IanvsPoplicola pushed a commit to IanvsPoplicola/elasticsearch that referenced this issue Mar 21, 2017
Update Coordination.md claim 23646
ClaudioMFreitas pushed a commit to ClaudioMFreitas/elasticsearch-1 that referenced this issue Nov 12, 2019
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
allow future field types
throw informative exceptions on fields currently known but not supported

relates to elastic#88
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
mindw pushed a commit to mindw/elasticsearch that referenced this issue Sep 5, 2022
…2021-04-01 (pull request elastic#88)

Add repo name to git pull logging

* Add repo name to git pull logging

Approved-by: warren
emilykmarx pushed a commit to emilykmarx/elasticsearch that referenced this issue Dec 26, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants