<commit_before>## Aliases

The add alias request allows us to alias an existing index to another name:

```scala
val resp = client.execute {
  add alias "places" on "locations"
}
```

Aliases can include filters to assist with partitioning data (such as limiting results to a certain customer or project) or commonly applied filtering:

```scala
val resp = client.execute {
  add alias "uk-locations" on "locations" filter termFilter("country", "uk")
}
```

Existing aliases can be removed using a similar request:

```scala
val resp = client.execute {
  remove alias "places" on "locations"
}
```

Multiple operations on aliases can be executed atomically:

```scala
val resp = client.execute {
  aliases(
    remove alias "places" on "old_locations",
    add alias "places" on "new_locations"
  )
}
```


For more information on the options for aliases, consult the official ElasticSearch [docs](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-aliases.html).
<commit_msg>Update aliases.md<commit_after>## Aliases

The add alias request allows us to alias an existing index to another name:

```scala
val resp = client.execute {
  addAlias("places") on "locations"
}
```

Aliases can include filters to assist with partitioning data (such as limiting results to a certain customer or project) or commonly applied filtering:

```scala
val resp = client.execute {
  addAlias("uk-locations") on "locations" filter termFilter("country", "uk")
}
```

Existing aliases can be removed using a similar request:

```scala
val resp = client.execute {
  removeAlias("places") on "locations"
}
```

Multiple operations on aliases can be executed atomically:

```scala
val resp = client.execute {
  aliases(
    removeAlias("places") on "old_locations",
    addAlias("places") on "new_locations"
  )
}
```


For more information on the options for aliases, consult the official ElasticSearch [docs](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-aliases.html).

{'fraction_non_alphanumeric': 0.10597014925373134, 'fraction_numerical': 0.0, 'mean_word_length': 4.795389048991354, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7172827', 'n_tokens_mistral': 603, 'n_tokens_neox': 554, 'n_words': 219}