title: Use logstash to copy index on same cluster
body: <p>I have an <code>ES 1.7.1</code> cluster and I wanted to "reindex" an Index. Since I cannot use <code>_reindex</code> I came across this tutorial to use logstash to copy an index onto a different cluster. However in my case I want to copy it over to the same cluster. This is my logstash.conf :</p>
  
  <pre><code>input {
    # We read from the "old" cluster
    elasticsearch {
      hosts =&gt; "myhost"
      port =&gt; "9200"
      index =&gt; "my_index"
      size =&gt; 500
      scroll =&gt; "5m"
      docinfo =&gt; true
    }
  }
  
  output {
    # We write to the "new" cluster
    elasticsearch {
      host =&gt; "myhost"
      port =&gt; "9200"
      protocol =&gt; "http"
      index =&gt; "logstash_test"
      index_type =&gt; "%{[@metadata][_type]}"
      document_id =&gt; "%{[@metadata][_id]}"
    }
    # We print dots to see it in action
    stdout {
      codec =&gt; "dots"
    }
  }
  filter {
    mutate {
      remove_field =&gt; [ "@timestamp", "@version" ]
    }
  }
  </code></pre>
  
  <p>This errors out with the following error message:</p>
  
  <pre><code>A plugin had an unrecoverable error. Will restart this plugin.
    Plugin: &lt;LogStash::Inputs::Elasticsearch hosts=&gt;[{:scheme=&gt;"http", :user=&gt;nil, :password=&gt;nil, :host=&gt;"myhost", :path=&gt;"", :port=&gt;"80", :protocol=&gt;"http"}], index=&gt;"my_index", scroll=&gt;"5m", query=&gt;"{\"query\": { \"match_all\": {} } }", docinfo_target=&gt;"@metadata", docinfo_fields=&gt;["_index", "_type", "_id"]&gt;
    Error: Connection refused - Connection refused {:level=&gt;:error}
  Failed to install template: http: nodename nor servname provided, or not known {:level=&gt;:error}
  </code></pre>
  
  <p>Any help would be appreciated</p>