4

I am using Elastic4s. I need to find all index names from an instance of ElasticSearch. What API shall I use?

Ningjun
  • 41
  • 1

3 Answers3

2

For Elastic4s version: 6.5.0. You can get all the indices using catIndices api provided by Elastic4s.

Here's an example:

val resp = client.execute {
  catIndices
}

You can refer the official doc for more info.

Tarang Bhalodia
  • 1,185
  • 11
  • 21
1

In elastic 1.6.5 you can do,

val resp = client.execute {
  clusterState
}
sksamuel
  • 16,154
  • 8
  • 60
  • 108
0

You can get all index names and details associated with it.

GET _cat/indices?v
Jayant Chauhan
  • 173
  • 1
  • 12