Loading...

Reduce Shards

Reindex to reduce shards, create target index with specific settings:

curl -XPUT "http://localhost:9200/fo-log-re-2017.06.18" -H 'Content-Type: application/json' -d'
{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0,
    "routing": {
      "allocation": {
        "require": {
          "box_type": "warm"
        }
      }
    }
  },
  "mappings": {
    "logs": {
      "properties": {
        "cardOppPlbAuthTime": {
          "type": "keyword"
        }
      }
    }
  }
}'

Basic reindex example

curl -XPOST 'localhost:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
{
  "source": {
    "index": "fo-log-2017.06.18"
  },
  "dest": {
    "index": "fo-log-re-2017.06.18"
  }
}
'

Tasks API

Works with the tasks API.

Check

Check running tasks

GET _tasks?detailed=true&actions=*reindex