Skip to content
Oliver Eilhard edited this page Mar 4, 2015 · 1 revision

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)
}
Clone this wiki locally