Created
April 27, 2018 08:29
-
-
Save johtani/310672675aec7d2a9ed8516bf0ae3558 to your computer and use it in GitHub Desktop.
reindex with index template in v6.2.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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