title: How to filter or query list of index names in Elasticsearch?
body: <p>I use the following to list indices</p>
  
  <pre><code>curl localhost:9200/_cat/indices?v 
  </code></pre>
  
  <p>Is there is any way to filter or query index names, for example like with wildcards?</p>
  
  <pre><code>curl localhost:9200/_cat/indices - d '{
    "query": {
      "prefix": {
        "index": "sam-"
      }
    }
  }'
  </code></pre>
  
  <p>What would be the format in elasticsearch.js?</p>