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

Aliases: Add endpoint to add one specific index alias #3076

Closed
martijnvg opened this Issue May 23, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@martijnvg
Copy link
Member

martijnvg commented May 23, 2013

Add put index alias api for adding a single index alias.

Options:

  • index - The index to alias refers to. This is a required option.
  • alias - The name of the alias. This is a required option.
  • routing - An optional routing that can be associated with an alias.
  • filter - An optional filter that can be associated with an alias.

The rest endpoint is: /{index}/_alias/{alias}

Examples:
Adding time based alias:

curl -XPUT 'localhost:9200/logs_201305/_alias/2013'

Adding user alias:

curl -XPUT 'localhost:9200/users/_alias/user_12' -d '{
    "routing" : "12",
    "filter" : {
        "term" : {
            "user_id" : 12
        }
    }   
}'

@ghost ghost assigned martijnvg May 23, 2013

martijnvg added a commit that referenced this issue May 23, 2013

Added three new index alias related apis.
Added apis to get specific index aliases based on filtering by alias name and index name:
```
curl -XGET 'localhost:9200/{index_or_alias}/_alias/{alias_name}'
```

Added delete index alias api for deleting a single index alias:
```
curl -XDELETE 'localhost:9200/{index}/_alias/{alias_name}'
```

Added create index alias api for adding a single index alias:
```
curl -XPUT 'localhost:9200/{index}/_alias/{alias_name}'

curl -XPUT 'localhost:9200/{index}/_alias/{alias_name}' -d '{
	"routing" : {routing},
	"filter" : {filter}
}'

```

Closes #3075 #3076 #3077

@martijnvg martijnvg closed this May 23, 2013

martijnvg added a commit that referenced this issue May 23, 2013

Added three new index alias related apis.
Added apis to get specific index aliases based on filtering by alias name and index name:
```
curl -XGET 'localhost:9200/{index_or_alias}/_alias/{alias_name}'
```

Added delete index alias api for deleting a single index alias:
```
curl -XDELETE 'localhost:9200/{index}/_alias/{alias_name}'
```

Added create index alias api for adding a single index alias:
```
curl -XPUT 'localhost:9200/{index}/_alias/{alias_name}'

curl -XPUT 'localhost:9200/{index}/_alias/{alias_name}' -d '{
	"routing" : {routing},
	"filter" : {filter}
}'

```

Closes #3075 #3076 #3077

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Added three new index alias related apis.
Added apis to get specific index aliases based on filtering by alias name and index name:
```
curl -XGET 'localhost:9200/{index_or_alias}/_alias/{alias_name}'
```

Added delete index alias api for deleting a single index alias:
```
curl -XDELETE 'localhost:9200/{index}/_alias/{alias_name}'
```

Added create index alias api for adding a single index alias:
```
curl -XPUT 'localhost:9200/{index}/_alias/{alias_name}'

curl -XPUT 'localhost:9200/{index}/_alias/{alias_name}' -d '{
	"routing" : {routing},
	"filter" : {filter}
}'

```

Closes elastic#3075 elastic#3076 elastic#3077
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.