title: Delete Indexes by index name and type using elasticSearch 2.3.3 in java
body: <p>I have a project in java where I index the data using elastic search 2.3.3. The indexes are of two types.</p>
  
  <p>My index doc looks like:</p>
  
  <pre><code>{
     "took": 10,
     "timed_out": false,
     "_shards": {
        "total": 1,
        "successful": 1,
        "failed": 0
     },
    "hits": {
        "total": 3,
        "max_score": 1,
        "hits": [
          {
             "_index": "test_index",
             "_type": "movies",
             "_id": "uReb0g9KSLKS18sTATdr3A",
             "_score": 1,
             "_source": {
                "genre": "Thriller"
              }
         },
         {
             "_index": "test_index",
             "_type": "drama",
             "_id": "cReb0g9KSKLS18sTATdr3B",
             "_score": 1,
             "_source": {
                "genre": "SuperNatural"
              }
          },
          {
             "_index": "index1",
             "_type": "drama",
             "_id": "cReb0g9KSKLS18sT76ng3B",
             "_score": 1,
             "_source": {
                "genre": "Romance"
              }
           }
        ]
     }
  }
  </code></pre>
  
  <p>I need to delete index of a particular name and type only. </p>
  
  <p><strong>For eg:-</strong> From the above doc, I want to delete indexes with Name <strong>"test_index"</strong> and type <strong>"drama"</strong>. </p>
  
  <p>So the result should look like:</p>
  
  <pre><code>{
     "took": 10,
     "timed_out": false,
     "_shards": {
        "total": 1,
        "successful": 1,
        "failed": 0
     },
    "hits": {
        "total": 2,
        "max_score": 1,
        "hits": [
          {
             "_index": "test_index",
             "_type": "movies",
             "_id": "uReb0g9KSLKS18sTATdr3A",
             "_score": 1,
             "_source": {
                "genre": "Thriller"
              }
         },
         {
             "_index": "index1",
             "_type": "drama",
             "_id": "cReb0g9KSKLS18sT76ng3B",
             "_score": 1,
             "_source": {
                "genre": "Romance"
              }
           }
        ]
     }
  }
  </code></pre>
  
  <p><strong>Solutions tried:</strong></p>
  
  <p><strong>client.admin().indices().delete(new DeleteIndexRequest("test_index").actionGet();</strong></p>
  
  <p>But it delete both indexes with name "test_index"</p>
  
  <p>I have also tried various queries in <strong>sense beta plugin</strong> like:</p>
  
  <p><strong>DELETE /test_index/drama</strong></p>
  
  <p>It gives the error: <strong>No handler found for uri [/test_index/drama] and method [DELETE]</strong></p>
  
  <p><strong>DELETE /test_index/drama/_query?q=_id:*&amp;analyze_wildcard=true</strong></p>
  
  <p>It also doesn't work.</p>
  
  <p>When I fire delete index request at that time id of indexes are unknown to us and I have to delete the indexes by name and type only.</p>
  
  <p><strong>How can I delete the required indexes using java api?</strong></p>