# Missing docvalue fields on reindex

**URL:** https://discuss.elastic.co/t/missing-docvalue-fields-on-reindex/83039
**Category:** Elasticsearch
**Created:** [April 20, 2017, 11:27am UTC](https://discuss.elastic.co/t/missing-docvalue-fields-on-reindex/83039 "2017-04-20T11:27:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Xavi\_Ametller](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@Xavi\_Ametller](https://discuss.elastic.co/u/Xavi_Ametller)
#### Post date: [April 20, 2017, 11:27am UTC](https://discuss.elastic.co/t/missing-docvalue-fields-on-reindex/83039/1 "2017-04-20T11:27:04Z")

</div>

Hello there,

I'm using the reindex api endpoint to create a reduced version of an index:

```
POST /_reindex
{
  "size": 10,
  "source": {
    "index": "big-index",
    "_source": ["*"],
    "query": {
      "match_all": {}
    }
  },
  "dest": {
    "index": "small-index"
  }
}

```

Thing is, the documents in the big-index contain some doc value fields which are missing in the small-index.  
I am able to see that by running this kind of query:

```
GET /big-index/_search
{
  "query": {
    "match_all": {}
  },
  "docvalue_fields" : ["doc_value_field"]
}

```

If I run this query against the big index, then the response has a fields section inside hits, but if I run it against the small index there's no such fields section and information can't be filtered by (as opposite as in the big-index).

I have tried to:

- Specify "docvalue\_fields" as part of reindex source, it does not complain but data is not there neither.
- Copy the mapping from the original index to the new one be fore reindexing but doesn't work neither.

Am I missing something? Looking around documentation and forums seems like everything should be copied and feel like I'm missing something very basic...

Thanks!  
Xavi

---

<div class="post-metadata">

### Author: ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)
#### Post date: [April 28, 2017, 1:11pm UTC](https://discuss.elastic.co/t/missing-docvalue-fields-on-reindex/83039/2 "2017-04-28T13:11:20Z")

</div>

Hm, could you post the mapping for the new and old index? Do you have any index templates which might be affecting things?

What version of Elasticsearch is this?

---

<div class="post-metadata">

### Author: ![Xavi\_Ametller](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@Xavi\_Ametller](https://discuss.elastic.co/u/Xavi_Ametller)
#### Post date: [May 4, 2017, 6:34am UTC](https://discuss.elastic.co/t/missing-docvalue-fields-on-reindex/83039/3 "2017-05-04T06:34:02Z")

</div>

Hi @polyfractal,

1. I'm sorry but I can't share the mappings. I can say though, that I copied the mapping from one index to the other (called the _get mapping_ API from the original index and _PUT mapping_ on the destination index with the answer of the previous call) before running the reindex.
2. We don't have any index templates
3. We use 5.1.1

Thanks for the answer, as of now, we will move forward ignoring this issue as it is not blocking us anymore. If I ever find an answer I will post it here.  
Cheers

---

<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: [June 1, 2017, 6:46am UTC](https://discuss.elastic.co/t/missing-docvalue-fields-on-reindex/83039/4 "2017-06-01T06:46:23Z")

</div>

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