# LS error while reindexing data

**URL:** <https://discuss.elastic.co/t/ls-error-while-reindexing-data/40218>\
**Category:** Logstash\
**Created:** [January 27, 2016, 11:27am UTC](https://discuss.elastic.co/t/ls-error-while-reindexing-data/40218 "2016-01-27T11:27:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [January 27, 2016, 11:27am UTC](https://discuss.elastic.co/t/ls-error-while-reindexing-data/40218/1 "2016-01-27T11:27:54Z")

</div>

Hi Experts ,

I am using logstash1.5.4 with ES1.7.1 to reindex old data to a new index . My LS conf file is like

```
input {
  elasticsearch {
    hosts => "localhost"
    index => "based1"
    query => "*"
    size => 500
    scroll => "5m"
    docinfo => true
  }
}
output {
  elasticsearch {
    action => "index" 
    index => "copy-of-production.%{[@metadata][_index]}"
    document_type => "%{[@metadata][_type]}"
    document_id => "%{[@metadata][_id]}"
  }
}

```

Now after running above conf i am getting below error

```
←[31mA plugin had an unrecoverable error. Will restart this plugin.
  Plugin: <LogStash::Inputs::Elasticsearch hosts=>["localhost"], index=>"based1", query=>"*", size=>500, scroll=>"5m", docinf
o=>true, debug=>false, codec=><LogStash::Codecs::JSON charset=>"UTF-8">, port=>9200, scan=>true, docinfo_target=>"@metadata",
 docinfo_fields=>["_index", "_type", "_id"], ssl=>false>
  Error: [400] {"error":"SearchPhaseExecutionException[Failed to execute phase [init_scan], all shards failed; shardFailures
{[WUV4iHvsTmOMV85yeaotEQ][based1][0]: SearchParseException[[based1][0]: from[-1],size[-1]: Parse Failure [Failed to parse sou
rce [_na_]]]; nested: ElasticsearchParseException[Failed to derive xcontent]; }{[WUV4iHvsTmOMV85yeaotEQ][based1][1]: SearchPa
rseException[[based1][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: ElasticsearchParseExcept
ion[Failed to derive xcontent]; }{[WUV4iHvsTmOMV85yeaotEQ][based1][2]: SearchParseException[[based1][2]: from[-1],size[-1]: P
arse Failure [Failed to parse source [_na_]]]; nested: ElasticsearchParseException[Failed to derive xcontent]; }{[WUV4iHvsTmO
MV85yeaotEQ][based1][3]: SearchParseException[[based1][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]];
 nested: ElasticsearchParseException[Failed to derive xcontent]; }{[WUV4iHvsTmOMV85yeaotEQ][based1][4]: SearchParseException[
[based1][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: ElasticsearchParseException[Failed to
 derive xcontent]; }]","status":400} {:level=>:error}←[0m

```

Any idea what is it ?

Thanks  
VG

---

<div class="post-metadata">

**Author:** ![krishna\_chaitanya](https://avatars.discourse-cdn.com/v4/letter/k/b5a626/32.png) [@krishna\_chaitanya](https://discuss.elastic.co/u/krishna_chaitanya)\
**Post date:** [October 31, 2016, 4:26am UTC](https://discuss.elastic.co/t/ls-error-while-reindexing-data/40218/2 "2016-10-31T04:26:44Z")

</div>

Vikas, any luck with this? I got the same error

---

<div class="post-metadata">

**Author:** ![krishna\_chaitanya](https://avatars.discourse-cdn.com/v4/letter/k/b5a626/32.png) [@krishna\_chaitanya](https://discuss.elastic.co/u/krishna_chaitanya)\
**Post date:** [October 31, 2016, 4:46am UTC](https://discuss.elastic.co/t/ls-error-while-reindexing-data/40218/3 "2016-10-31T04:46:30Z")

</div>

I could solve this by removing `query => "*"` . By default elasticsearch input takes `match_all`

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [November 1, 2016, 10:08am UTC](https://discuss.elastic.co/t/ls-error-while-reindexing-data/40218/4 "2016-11-01T10:08:36Z")

</div>

Thanks Krishna,

Actually I re index the data since I was not able to resolve this . Will try with this new approach

Thanks  
Vikas

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:31am UTC](https://discuss.elastic.co/t/ls-error-while-reindexing-data/40218/5 "2017-07-06T04:31:47Z")

</div>


