# Sorting Get Aliases with new Java client

**URL:** <https://discuss.elastic.co/t/sorting-get-aliases-with-new-java-client/356302>\
**Category:** Elasticsearch\
**Created:** [March 27, 2024, 3:18pm UTC](https://discuss.elastic.co/t/sorting-get-aliases-with-new-java-client/356302 "2024-03-27T15:18:05Z")\
**Posts on this page:** 2\
**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:** [March 27, 2024, 3:18pm UTC](https://discuss.elastic.co/t/sorting-get-aliases-with-new-java-client/356302/1 "2024-03-27T15:18:05Z")

</div>

Hi,

I am looking way to execute cat in the new Java client

```auto
GET _cat/aliases/bbb*/?format=json&s=is_write_index:desc

```

I found this way:

```auto
AliasesRequest request = AliasesRequest.of(ar -> ar.name(pattern));		
		
		var response = client.cat().aliases(request);
		
		return response.valueBody();

```

How can I add the following:  
s=is\_write\_index:desc

---

<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:** [April 24, 2024, 3:18pm UTC](https://discuss.elastic.co/t/sorting-get-aliases-with-new-java-client/356302/2 "2024-04-24T15:18:06Z")

</div>

Closed on April 24, 2024, 3:18pm UTC

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