# SwapAlias() function not working?

**URL:** <https://discuss.elastic.co/t/swapalias-function-not-working/59079>\
**Category:** Elasticsearch\
**Created:** [August 26, 2016, 9:10pm UTC](https://discuss.elastic.co/t/swapalias-function-not-working/59079 "2016-08-26T21:10:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edwardo\_Hanna](https://avatars.discourse-cdn.com/v4/letter/e/5f9b8f/32.png) [@Edwardo\_Hanna](https://discuss.elastic.co/u/Edwardo_Hanna)\
**Post date:** [August 26, 2016, 9:10pm UTC](https://discuss.elastic.co/t/swapalias-function-not-working/59079/1 "2016-08-26T21:10:58Z")

</div>

Hi,

I am implementing the SwapAlias() function at this GitHub page: [https://github.com/elastic/elasticsearch-net-example/blob/2.x-codecomplete/src/NuSearch.Indexer/Program.cs](https://github.com/elastic/elasticsearch-net-example/blob/2.x-codecomplete/src/NuSearch.Indexer/Program.cs)

This SwapAlias() function was part of a tutorial at [https://github.com/elastic/elasticsearch-net-example/tree/2.x](https://github.com/elastic/elasticsearch-net-example/tree/2.x)

When I finally do GET /\_cat/aliases?v I don't see any aliases listed. Why is this so?

Thanks!

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [August 30, 2016, 11:54am UTC](https://discuss.elastic.co/t/swapalias-function-not-working/59079/2 "2016-08-30T11:54:35Z")

</div>

Hi @Edwardo_Hanna

There was [a small bug in `GetAlias()` that was fixed in NEST 2.4.4](https://github.com/elastic/elasticsearch-net/commit/994c5120f5ef3616b25489a96b491639e022982d); be sure to upgrade the version of NEST 2.x that you are using to 2.4.4.

The rest of the `SwapAlias()` implementation looks correct. Can you share how you are using it?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:24pm UTC](https://discuss.elastic.co/t/swapalias-function-not-working/59079/3 "2017-07-05T22:24:03Z")

</div>


