Last active
April 10, 2020 01:23
-
-
Save jakelandis/16deef3b9f9f9aae3dbd94e9e8f804bd to your computer and use it in GitHub Desktop.
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 _component_template/base | |
{ | |
"template": { | |
"settings": { | |
"index": { | |
"number_of_shards": 1, | |
"number_of_replicas": 3 | |
} | |
} | |
} | |
} | |
PUT _component_template/with_time | |
{ | |
"template":{ | |
"settings":{ | |
"index":{ | |
"sort.field":"date", | |
"sort.order":"desc" | |
} | |
}, | |
"mappings":{ | |
"properties":{ | |
"date":{ | |
"type":"date", | |
"format":"yyyy-MM-dd" | |
} | |
} | |
} | |
} | |
} | |
PUT _index_template/myindex | |
{ | |
"index_patterns": [ | |
"myindex*" | |
], | |
"composed_of": [ | |
"base", | |
"with_time" | |
] | |
} | |
PUT myindex | |
GET myindex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
results