Skip to content

Instantly share code, notes, and snippets.

@johtani
Created April 27, 2018 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johtani/310672675aec7d2a9ed8516bf0ae3558 to your computer and use it in GitHub Desktop.
Save johtani/310672675aec7d2a9ed8516bf0ae3558 to your computer and use it in GitHub Desktop.
reindex with index template in v6.2.4
PUT _template/hoge
{
"index_patterns": ["hoge-*"],
"settings": {
"number_of_replicas": 0,
"number_of_shards": 2
},
"mappings": {
"type1": {
"properties": {
"host_name": {
"type": "keyword"
}
}
}
}
}
PUT hoge-fuga/type1/1
{
"host_name": "johtani"
}
GET hoge-fuga
POST _reindex
{
"source": {
"index": "hoge-fuga"
},
"dest": {
"index": "hoge-fuga-xyz"
}
}
GET hoge-fuga-xyz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment