Reputation: 41
I am using Elastic4s. I need to find all index names from an instance of ElasticSearch. What API shall I use?
Upvotes: 4
Views: 845
Reputation: 1195
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.
Upvotes: 2
Reputation: 173
You can get all index names and details associated with it.
GET _cat/indices?v
Upvotes: 0
Reputation: 16387
In elastic 1.6.5 you can do,
val resp = client.execute {
clusterState
}
Upvotes: 1