elasticsearch/elasticsearch — pull request #7976 by polyfractal (2014-10-03 14:55:32+00:00)
Title: Aliases: Throw exception if index is null when creating alias

Fixes a bug where alias creation would allow `null` for index name, which thereby applied the alias to _all_ indices. This patch makes the validator throw an exception if the index is null.

Fixes #7863

```bash
POST /_aliases
{
"actions": [
{
"add": {
"alias": "empty-alias",
"index": null
}
}
]
}
```
```json
{
"error": "ActionRequestValidationException[Validation Failed: 1: Alias action [add]: [index] may not be null;]",
"status": 400
}
```