function for generating Elasticsearch index names from text

Basically strips out chars that are illegal in URLs.
function for listing names of Elasticsearch indexes