Last active
June 5, 2019 14:16
-
-
Save mikemilano/aab32b93ae843429bbd47825cda6fe72 to your computer and use it in GitHub Desktop.
Elasticsearch index template example
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
By adding the following template to an Elasticsearch | |
instance, you will assure any index with a name | |
beginning with `enrollment-log` will inherit the | |
mappings defined within. | |
PUT _template/enrollment-log | |
{ | |
"template": "enrollment-log*", | |
"settings": { | |
"number_of_shards": 4 | |
}, | |
"mappings": { | |
"doc": { | |
"properties": { | |
"@timestamp": { | |
"type": "date" | |
}, | |
"@version": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
}, | |
"action": { | |
"type": "keyword" | |
}, | |
"creator": { | |
"type": "keyword" | |
}, | |
"districtId": { | |
"type": "integer" | |
}, | |
"districtReviewer": { | |
"type": "keyword" | |
}, | |
"enrollee": { | |
"type": "keyword" | |
}, | |
"enrollmentId": { | |
"type": "integer" | |
}, | |
"enrollmentType": { | |
"type": "keyword" | |
}, | |
"timestamp": { | |
"type": "date" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment