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 indices aliases exists api #3100

Closed
martijnvg opened this issue May 27, 2013 · 0 comments
Closed

Aliases: Add indices aliases exists api #3100

martijnvg opened this issue May 27, 2013 · 0 comments

Comments

@martijnvg
Copy link
Member

Add indices aliases exists api that allows to check to existence of an index alias. This api redirects to the master to check for the existence of one or multiple index aliases.

Possible options:

  • index - The index name to check index aliases for. Partially names are supported via wildcards, also multiple index names can be specified separated with a comma. Also the alias name for an index can be used.
  • alias - The name of alias to check the existence for. Like the index option, this option supports wildcards and the option the specify multiple alias names separated by a comma. This is a required option.
  • ignore_indices - What to do is an specified index name doesn't exist. If set to missing then those indices are ignored.

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

Examples:
Check existence for any aliases with the name 2013 in any index:

curl -XHEAD 'localhost:9200/_alias/2013

Check existence for any aliases that start with 2013_01 in any index

curl -XHEAD 'localhost:9200/_alias/2013_01*

Check existence for any aliases in the users index.

curl -XHEAD 'localhost:9200/users/_alias/*
@ghost ghost assigned martijnvg May 27, 2013
martijnvg added a commit that referenced this issue May 27, 2013
Added indices aliases exists api that allows to check to existence of an index alias. This api redirects to the master to check for the existence of one or multiple index aliases.

Possible options:
* `index` - The index name to check index aliases for. Partially names are supported via wildcards, also multiple index names can be specified separated with a comma. Also the alias name for an index can be used.
* `alias` - The name of alias to check the existence for. Like the index option, this option supports wildcards and the option the specify multiple alias names separated by a comma. This is a required option.
* `ignore_indices` - What to do is an specified index name doesn't exist. If set to `missing` then those indices are ignored.

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

Examples:
Check existence for any aliases with the name 2013 in any index:
```
curl -XHEAD 'localhost:9200/_alias/2013
```
Check existence for any aliases that start with 2013_01 in any index
```
curl -XHEAD 'localhost:9200/_alias/2013_01*
```
Check existence for any aliases in the users index.
```
curl -XHEAD 'localhost:9200/users/_alias/*
```

Closes #3100
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Added indices aliases exists api that allows to check to existence of an index alias. This api redirects to the master to check for the existence of one or multiple index aliases.

Possible options:
* `index` - The index name to check index aliases for. Partially names are supported via wildcards, also multiple index names can be specified separated with a comma. Also the alias name for an index can be used.
* `alias` - The name of alias to check the existence for. Like the index option, this option supports wildcards and the option the specify multiple alias names separated by a comma. This is a required option.
* `ignore_indices` - What to do is an specified index name doesn't exist. If set to `missing` then those indices are ignored.

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

Examples:
Check existence for any aliases with the name 2013 in any index:
```
curl -XHEAD 'localhost:9200/_alias/2013
```
Check existence for any aliases that start with 2013_01 in any index
```
curl -XHEAD 'localhost:9200/_alias/2013_01*
```
Check existence for any aliases in the users index.
```
curl -XHEAD 'localhost:9200/users/_alias/*
```

Closes elastic#3100
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

1 participant