Reindex in place

edit

You can use the Upgrade Assistant in Kibana 6.8 to automatically reindex 5.x indices you need to carry forward to 7.3.2.

To manually reindex your old indices in place:

  1. Create an index with 7.x compatible mappings.
  2. Set the refresh_interval to -1 and the number_of_replicas to 0 for efficient reindexing.
  3. Use the reindex API to copy documents from the 5.x index into the new index. You can use a script to perform any necessary modifications to the document data and metadata during reindexing.
  4. Reset the refresh_interval and number_of_replicas to the values used in the old index.
  5. Wait for the index status to change to green.
  6. In a single update aliases request:

    1. Delete the old index.
    2. Add an alias with the old index name to the new index.
    3. Add any aliases that existed on the old index to the new index.

If you use machine learning features and your machine learning indices were created before 6.x, you must temporarily halt the tasks associated with your machine learning jobs and datafeeds and prevent new jobs from opening during the reindex. Use the set upgrade mode API or stop all datafeeds and close all machine learning jobs.

If you use Elasticsearch security features, before you reindex .security* internal indices it is a good idea to create a temporary superuser account in the file realm.

  1. On a single node, add a temporary superuser account to the file realm. For example, run the elasticsearch-users useradd command:

    bin/elasticsearch-users useradd <user_name> \
    -p <password> -r superuser
  2. Use these credentials when you reindex the .security* index. That is to say, use them to log into Kibana and run the Upgrade Assistant or to call the reindex API. You can use your regular administration credentials to reindex the other internal indices.
  3. Delete the temporary superuser account from the file realm. For example, run the elasticsearch-users userdel command:

    bin/elasticsearch-users userdel <user_name>

For more information, see Configuring a file realm.