# Get list of current hot indexes in elasticSearch

**URL:** <https://discuss.elastic.co/t/get-list-of-current-hot-indexes-in-elasticsearch/308870>\
**Category:** Elasticsearch\
**Created:** [July 5, 2022, 8:06am UTC](https://discuss.elastic.co/t/get-list-of-current-hot-indexes-in-elasticsearch/308870 "2022-07-05T08:06:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![avnere](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@avnere](https://discuss.elastic.co/u/avnere)\
**Post date:** [July 5, 2022, 8:06am UTC](https://discuss.elastic.co/t/get-list-of-current-hot-indexes-in-elasticsearch/308870/1 "2022-07-05T08:06:25Z")

</div>

Hi,

Currently I am getting list of current hot indexes through Low Level Client:

```auto
Request request = new Request("GET", "/_cat/aliases/" + ALIAS_NAME+ "?format=json&s=is_write_index:desc,");

```

1. Is there a way to get list of current hot indexes through ElasticsearchClient instead the low level client?

2. What is the approach for doing it in Elasticsearch 8?

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [July 5, 2022, 12:16pm UTC](https://discuss.elastic.co/t/get-list-of-current-hot-indexes-in-elasticsearch/308870/2 "2022-07-05T12:16:32Z")

</div>

Hi @avnere .

Using this way is interesting for you?

High Level Rest Client

```auto
    GetAliasesRequest getAliasesRequest = new GetAliasesRequest();
    getAliasesRequest.aliases("test_alias");
    GetAliasesResponse response = getClient().indices().getAlias(getAliasesRequest, RequestOptions.DEFAULT);

```

Java API Client

```
GetAliasRequest getAliasRequest = GetAliasRequest.of(ar -> ar.name("test_alias"));
GetAliasResponse getAliasResponse = client.indices().getAlias(getAliasRequest);

```

---

<div class="post-metadata">

**Author:** ![avnere](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@avnere](https://discuss.elastic.co/u/avnere)\
**Post date:** [July 5, 2022, 12:42pm UTC](https://discuss.elastic.co/t/get-list-of-current-hot-indexes-in-elasticsearch/308870/3 "2022-07-05T12:42:41Z")

</div>

What is the different between?

```auto
GetAliasRequest getAliasRequest = GetAliasRequest.of(ar -> ar.name("test_alias"));
GetAliasResponse getAliasResponse = client.indices().getAlias(getAliasRequest);

```

to

```auto
ElasticsearchCatClient catClient = client.cat();

AliasesResponse	aliasesResponse = catClient.aliases(AliasesRequest.of(ar -> ar.name(indexAliasName)));

```

---

<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:** [August 2, 2022, 12:43pm UTC](https://discuss.elastic.co/t/get-list-of-current-hot-indexes-in-elasticsearch/308870/4 "2022-08-02T12:43:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
