Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: format and additional info

...

Expand
titleCURL command & more information

The Reindex operation itself provides a few options for configuration. For large data volumes especially, we employ parameters that increase stability and performance of the operation, such the 'slices' parameter for automatic parallelization of the Reindex.

Code Block
titleCURL commandCommand Reindex Operation
collapsetrue
curl -X POST "localhost:9200/_reindex?pretty&slices=20&wait_for_completion=false&refresh" -H 'Content-Type: application/json' -d'
{
  "source": {
    "index": "yuuvis_1"
  },
  "dest": {
    "index": "yuuvis_2"
  },
  "conflicts": "proceed"
}
'


After the reindex has completed, the new Index must be activated by reassigning the 'yuuvis' alias from the old Index to the new.  

The new index needs to inherit the 'yuuvis' alias from the original index, meaning that the 'yuuvis' alias must be deleted from the original index beforehand.

Expand
titleCURL command & more information
Code Block
titleCURL command
Code Block
titleCURL Command Reindex Operation
collapsetrue
curl -X DELETE "localhost:9200/yuuvis_21/_alias/yuuvis?pretty"

curl -X POST "localhost:9200/_aliases?pretty" -H 'Content-Type: application/json' -d'
{
  "actions": [
    {
      "add": {
        "index": "yuuvis_42",
        "alias": "yuuvis"
      }
    }
  ]
}
'


3. Deleting the original Index

...

Expand
titleCURL command & more information

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.htmlMake sure to verify the Momentum system still works correctly and contains all expected data before proceeding with the deletion of the original index.

Code Block
titleCURL command
collapsetrue
curl -X DELETE "localhost:9200/yuuvis_1"


...