Created
August 12, 2021 15:21
-
-
Save dakrone/018e8c529c8e9f7e3c83cbf852e95f09 to your computer and use it in GitHub Desktop.
This file contains 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/mappings | |
{ | |
"template": { | |
"mappings": { | |
"properties": { | |
"@timestamp": { | |
"type": "date" | |
} | |
} | |
} | |
} | |
} | |
PUT /_component_template/empty | |
{ | |
"template": {} | |
} | |
PUT /_index_template/together | |
{ | |
"index_patterns": ["foo"], | |
"template": { | |
"mappings": { | |
"properties": { | |
"@other-timestamp": { | |
"type": "date" | |
} | |
} | |
}, | |
"settings": { | |
"index.number_of_shards": 3, | |
"index.number_of_replicas": 0 | |
} | |
}, | |
"composed_of": ["mappings", "empty"] | |
} | |
PUT /foo | |
GET /foo | |
################# output | |
{ | |
"foo" : { | |
"aliases" : { }, | |
"mappings" : { | |
"properties" : { | |
"@other-timestamp" : { | |
"type" : "date" | |
}, | |
"@timestamp" : { | |
"type" : "date" | |
} | |
} | |
}, | |
"settings" : { | |
"index" : { | |
"routing" : { | |
"allocation" : { | |
"include" : { | |
"_tier_preference" : "data_content" | |
} | |
} | |
}, | |
"number_of_shards" : "3", | |
"provided_name" : "foo", | |
"creation_date" : "1628781621962", | |
"number_of_replicas" : "0", | |
"uuid" : "ApcnEgLjSWeTvAQyBeZVZA", | |
"version" : { | |
"created" : "7130499" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment