IndexNames - olivere/elastic GitHub Wiki

The IndexNames shortcut returns all index names of an Elasticsearch cluster.

names, err := client.IndexNames()
if err != nil {
    // Handle error
    panic(err)
}
for _, name := range names {
    fmt.Printf("%s\n", name)
}