# Rejecting mapping update

**URL:** https://discuss.elastic.co/t/rejecting-mapping-update/150556
**Category:** Beats
**Tags:** filebeat
**Created:** [October 1, 2018, 11:02am UTC](https://discuss.elastic.co/t/rejecting-mapping-update/150556 "2018-10-01T11:02:55Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![adrisr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrisr/32/25423_2.png) [@adrisr](https://discuss.elastic.co/u/adrisr)
#### Post date: [October 2, 2018, 4:43pm UTC](https://discuss.elastic.co/t/rejecting-mapping-update/150556/11 "2018-10-02T16:43:16Z")

</div>

So right now you have a 5.x index that contains two different types, and you want to reindex every type into a different new index.

I understand that the way of achieving this is to use the `type` filtering in the reindex API as explained here: [Reindex API | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html)

Something like:

```auto
POST _reindex
{
  "source": {
    "index": "logstash-YYYY.MM.DD",
    "type": "logs",
  },
  "dest": {
    "index": "logstash-YYYY.MM.DD-logs-reindexed"
  }
}

```

and

```auto
POST _reindex
{
  "source": {
    "index": "logstash-YYYY.MM.DD",
    "type": "kube-logs",
  },
  "dest": {
    "index": "logstash-YYYY.MM.DD-kube-logs-reindexed"
  }
}

```

You can also map all your documents to the same index, by removing the type information, as explained here:

> [@Dec 15th, 2017: \[EN\]\[Elasticsearch\] Going from multiple types to one type with the Reindex API](https://discuss.elastic.co/t/dec-15th-2017-en-elasticsearch-going-from-multiple-types-to-one-type-with-the-reindex-api/111315):
>
> Every document in Elasticsearch has a type. It has long been the recommendation of Elastic to use only one document type per index, but with the release of version 6.0 this has become more than just advice. For new indices, Elasticsearch now only accepts one document type per index, as a first step to [the complete removal of document types in future versions of Elasticsearch](https://www.elastic.co/blog/removal-of-mapping-types-elasticsearch). The fact that Elasticsearch now only accepts a single type per index makes this a good time to think about how you would…

Otherwise, you will get more authoritative answers in #elasticsearch

---

_[View the full topic](https://discuss.elastic.co/t/rejecting-mapping-update/150556)._
