How to really reindex data in elasticsearch

Related searches

I have added new mappings (mainly not_analyzed versions of existing fields) I now have to figure out how to reindex the existing data. I have tried following the guide on elastic search website but that is just too confusing. I have also tried using plugins (elasticsearch-reindex, allegro/elasticsearch-reindex-tool). I have looked at ElasticSearch - Reindexing your data with zero downtime which is a similar question. I was hoping to not have to rely on external tools (if possible) and try and use bulk API (as with original insert)

I could easily rebuild the whole index as it's a read only data really but that wont really work in the long term if I should want to add more fields etc etc when I'm in production with it. I wondered if there was anyone who knows of an easy to understand/follow solution or steps for a relative novice to ES. I'm on version 2 and using Windows.

How to really reindex data in elasticsearch, For example, you cannot reindex a data stream into itself. Extracts the document source from the source index and indexes the documents into the destination� One of the drawbacks of ElasticSearch is the lack of mapping updates to existing fields. Once a field has been mapped, it can not be modified unless it has been reindexed. Reindexing eliminates the original index and creates a new index in the process of new mapping and some downtime. For a business, this is critical.

With version 2.3.4 a new api _reindex is available which will do exactly what it says. Basic usage is

    "source": {
        "index": "currentIndex"
    "dest": {
        "index": "newIndex"

Reindex API | Elasticsearch Reference [7.9], Hi, I am trying to reindex data in Elasticsearch without actually changing index names. I am ingesting data to indices based on monthly index� Up to Elasticsearch 2.3, we had to use external tools to help us with this operation, like Logstash or stream2es. We even wrote about how to approach reindexing of data with Logstash. However

I faced same problem. But i couldn't find any resource to update current index mapping and analyzer. My suggestion is to use scroll and scan api and reindex your data to new index with new mapping and new fields.

How to reindex data in Elasticsearch without actually changing , It really helps Elasticsearch to index data, particularly if there are dates or timestamps involved. That is why Elasticsearch is very good tool for� Move data to the new index. Database migration is done by reindex operation in Elasticsearch. $ curl -H 'Content-Type: application/json' \ -XPOST http://<Elasticsearch Host>/_reindex \ -d @reindex.json. The migration target and source index are specified in the body of the request.

Elasticsearch Reindex from Remote host to Local Host example (Jan 2020 Update)

# show indices on this host
curl 'localhost:9200/_cat/indices?v'

# edit elasticsearch configuration file to allow remote indexing
sudo vi /etc/elasticsearch/elasticsearch.yml

## copy the line below somewhere in the file
# --- whitelist for remote indexing ---

# restart elaticsearch service
sudo systemctl restart elasticsearch

# run reindex from remote machine to copy the index named filebeat-2016.12.01
curl -H 'Content-Type: application/json' -X POST -d'{
  "source": {
    "remote": {
      "host": ""
    "index": "filebeat-2016.12.01"
  "dest": {
    "index": "filebeat-2016.12.01"

# verify index has been copied
curl 'localhost:9200/_cat/indices?v'

How to Map and Reindex Elasticsearch Data, Move data to the new index. Database migration is done by reindex operation in Elasticsearch. $ curl -H 'Content-Type:� Reindex requires _source to be enabled for all documents in the source index. Reindex does not attempt to set up the destination index. It does not copy the settings of the source index. You should set up the destination index prior to running a _reindex action, including setting up mappings, shard counts, replicas, etc.

How to reindex Elasticsearch � The First Cry of Atom, Reindex from a remote cluster. Log in to the Elasticsearch Service Console . Select a deployment or create one. If the old Elasticsearch cluster is on a remote host, add an Elasticsearch reindex.remote.whitelist user setting: From your deployment menu, go to the Edit page. At the bottom of each

I've started reindexing some of my data from one index to another using the Reindex API. The problem is that now I want to stop the reindexing process, even though it has not finished. I'm able to see the process running with this command:

How to really reindex data in elasticsearch. 2. Elasticsearch Reindexing while updating documents? 11. Change type and reindex in Elasticsearch. 2.

  • What point version of ElasticSearch are you using? If you are using 2.3, the native _reindex api is available. It can do precisely what you're looking for. I'm not sure which guide you are referring to ("the guide on elastic search website") but this is the docs on the reindex api:… If I'm not mistaken, you can reindex into the same index, effectively leaving the data in place. There are document version issues you have to be aware of though.
  • Yeah I had this problem some months ago but I too noticed the reindex API being available... Wasn't able to verify if you can reindex into the same index
  • It seems you cannot reindex into the same index
  • I've the same problem. You can check this answer.
  • Here is a small process for creating new mappings on an existing index (with re-index):…
  • Thanks for replying. I wanted to lean more towards the "zero downtime" approach. I can push in another dataset in again which will take 15-20 mins with a new version of mapping with both analyzed and not analyzed fields present.(that is a back up plan). Really I wanted to explore the other option of not having to do that when I'm in production
  • You can add a new mapping only if you create a new index - sorry that wasn't clear in my post. I added this above. Most users have separate indices for each period in time (lets say daily). Then new fields and/or new mappings are applied on all new created indices. I also add some thought for zero downtime in the post.
  • You could reindex from "currentIndex" to a temporary index and then back to "currentIndex". You can use the op_type and version_type parameters to control how you handle duplicates/overwriting data.
  • That's what I ended up doing