# Elasticsearch reindex parsing error

**URL:** <https://discuss.elastic.co/t/elasticsearch-reindex-parsing-error/264251>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [February 14, 2021, 3:02pm UTC](https://discuss.elastic.co/t/elasticsearch-reindex-parsing-error/264251 "2021-02-14T15:02:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [February 14, 2021, 3:02pm UTC](https://discuss.elastic.co/t/elasticsearch-reindex-parsing-error/264251/1 "2021-02-14T15:02:46Z")

</div>

Hi all, i'm trying to copy data of specified fields from one index to another using **reindex**.

curl -XPOST --header 'Content-Type: application/json' [http://localhost:9200/\_reindex](http://localhost:9200/_reindex) -d '{

> "source": {  
> "index1": "sunny\_1"  
> },  
> "dest": {  
> "index2": "sunny\_1\_copy"  
> }  
> }'

**I get a parsing error**

{"error":{"root\_cause":[{"type":"parsing\_exception","reason":"Unknown key for a VALUE\_STRING in [index1].","line":1,"col":11}],"type":"x\_content\_parse\_exception","reason":"[4:3] [reindex] failed to parse field [source]","caused\_by":{"type":"parsing\_exception","reason":"Unknown key for a VALUE\_STRING in [index1].","line":1,"col":11}},"status":400}

I want to where this error is coming from and why is this error coming when i have selected only some fields to reindex?

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [February 14, 2021, 3:17pm UTC](https://discuss.elastic.co/t/elasticsearch-reindex-parsing-error/264251/2 "2021-02-14T15:17:38Z")

</div>

Should be like this, same keyword `index`

```auto
{
  "source": {
    "index": "sunny_1"
  },
  "dest": {
    "index": "sunny_1_copy"
  }
}

```

> **[Reindex API | Elasticsearch Reference \[7.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html)**

---

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [February 14, 2021, 3:27pm UTC](https://discuss.elastic.co/t/elasticsearch-reindex-parsing-error/264251/3 "2021-02-14T15:27:33Z")

</div>

Thanks! that solved the issue!

---

<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:** [March 14, 2021, 3:27pm UTC](https://discuss.elastic.co/t/elasticsearch-reindex-parsing-error/264251/4 "2021-03-14T15:27:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
