5

I tried this first: GET _cat/indices which gave me all of my indices.

I added GET _cat/indices?v to get the column names so I would be able to sort by column name like this GET _cat/indices?v&s=store.size

Now, I just want to swap the sort order.

ElasticSearch guide had no information regarding this.

1 Answer 1

11

You can use the suffix :desc like this to get there:

http://localhost:9200/_cat/indices/?s=store.size:desc

health status index                    uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   tmdb                     DVLEul7bT4yGyiq34h4nCQ   1   1      27760            0    119.8mb        119.8mb
green  open   .kibana_2                6WJ3UFpOSj2O8zi-iLuw6w   1   0         10            0     35.3kb         35.3kb
green  open   .kibana_task_manager_1   WSwYXmMOSpyQOQ8ZIRniwg   1   0          2            0     31.6kb         31.6kb
green  open   .tasks                   _SsI5VWNSwO5Yfps3K12Qg   1   0          1            0      6.3kb          6.3kb
green  open   .kibana_1                MukHGTHfTkKS1HcYodfNqA   1   0          1            0        4kb            4kb
yellow open   my_index                 7FgIWDJOSQesKbJI-HKRoA   1   1          1            0      3.8kb          3.8kb
green  open   .ltrstore                -Xh6WnJYSsWIoPGP8fhgGw   1   0          0            0       283b           283b
green  open   .apm-agent-configuration 6FUF8T5oTDGcLBqcU7ymJg   1   0          0            0       283b           283b

This ability is mildly-buried/described-briefly in this section of the docs.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.