# Not able to reindex data

**URL:** <https://discuss.elastic.co/t/not-able-to-reindex-data/37437>\
**Category:** Elasticsearch\
**Created:** [December 17, 2015, 7:21am UTC](https://discuss.elastic.co/t/not-able-to-reindex-data/37437 "2015-12-17T07:21:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![KavyaS](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@KavyaS](https://discuss.elastic.co/u/KavyaS)\
**Post date:** [December 17, 2015, 7:21am UTC](https://discuss.elastic.co/t/not-able-to-reindex-data/37437/1 "2015-12-17T07:21:18Z")

</div>

I wanted to rename a field in my logs in an existing index. So i created an alias for the existing index and pointed it to a new index. It doesn't show any documents in the new index. When i use the scan and scroll approach with the scroll ID it returns an error "unit is missing or unrecognized". The logs are not getting pushed into new index. How do i solve this?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 17, 2015, 7:34am UTC](https://discuss.elastic.co/t/not-able-to-reindex-data/37437/2 "2015-12-17T07:34:39Z")

</div>

You probably did not give a unit to the scroll time.

---

<div class="post-metadata">

**Author:** ![KavyaS](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@KavyaS](https://discuss.elastic.co/u/KavyaS)\
**Post date:** [December 17, 2015, 7:36am UTC](https://discuss.elastic.co/t/not-able-to-reindex-data/37437/3 "2015-12-17T07:36:05Z")

</div>

Yes i did: GET /\_search/scroll?scroll=1m followed by scroll id

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 17, 2015, 7:53am UTC](https://discuss.elastic.co/t/not-able-to-reindex-data/37437/4 "2015-12-17T07:53:43Z")

</div>

May be a full example would help. I'm clueless here.

---

<div class="post-metadata">

**Author:** ![KavyaS](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@KavyaS](https://discuss.elastic.co/u/KavyaS)\
**Post date:** [December 17, 2015, 9:32am UTC](https://discuss.elastic.co/t/not-able-to-reindex-data/37437/5 "2015-12-17T09:32:02Z")

</div>

This is a part of my logstash.conf file for renaming the fields:

> mutate{  
> rename =\> { "NoOfViews" =\> "TotalViews" }  
> }  
> mutate{  
> rename =\> { "NoOfDownloads" =\> "TotalDownloads" }  
> }   
> output {  
> stdout {codec =\> rubydebug}  
> elasticsearch {  
> hosts =\> "localhost"  
> index =\> `"movie_trial_indexer"`

> }

I added the above "rename" filter lines to the conf file after the index ` movie_trial_indexer`was created. In order to reindex the data i tried creating an alias for `movie_trial_indexer` and link the alias to a new index `movie1_trial_indexer`as follows:

> PUT /movie\_trial\_indexer/\_alias/ind1  
> POST /\_aliases  
> {  
> "actions": [  
> { "remove": {  
> "alias": "ind1",  
> "index": "movie\_trial\_indexer"  
> }  
> }
> 
> }

> POST /\_aliases  
> {  
> "actions": [  
> { "add": {  
> "alias": "ind1",  
> "index": "movie1\_trial\_indexer"  
> }  
> }  
> ]  
> }

Then to reindex i used the scan and scroll approach:

> GET /movie\_trial\_indexer/\_search?search\_type=scan&scroll=1m  
> {  
> "query": { "match\_all": {}},  
> "size": 1000  
> }

It returned a scroll ID. Then i executed the following to retrieve results:

> GET /\_search/scroll?scroll=1m c2Nhbjs1OzU5MjE3Ok9GcFk1ZUZTVGt1VFhxcHYwZW5VVUE7NTkyMTU6T0ZwWTVlRlNUa3VUWHFwdjBlblVVQTs1OTIxODpPRnBZNWVGU1RrdVRYcXB2MGVuVVVBOzU5MjE2Ok9GcFk1ZUZTVGt1VFhxcHYwZW5VVUE7NTkyMTk6T0ZwWTVlRlNUa3VUWHFwdjBlblVVQTsxO3RvdGFsX2hpdHM6Nzs=

It was showing an error like this:

> "type": "parse\_exception",  
> "reason": "Failed to parse setting [scroll] with value [1m scroll\_id] as a time value: unit is missing or unrecognized"

If i execute the following using the new index :

> GET /movie1\_trial\_indexer/movie/\_search

I get:

> "took": 1,  
> "timed\_out": false,  
> "\_shards": {  
> "total": 5,  
> "successful": 5,  
> "failed": 0  
> },  
> "hits": {  
> "total": 0,  
> "max\_score": null,  
> "hits":   
> }

But there are no logs in the new index. How do i push the logs from old index to new index with changes updated?

---

<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 5, 2017, 11:30pm UTC](https://discuss.elastic.co/t/not-able-to-reindex-data/37437/6 "2017-07-05T23:30:17Z")

</div>


