DELETE my-index-00000*
PUT my-index-000001
{
"mappings": {
"dynamic_templates": [
{
"integers": {
"match_mapping_type": "long",
"mapping": {
"type": "integer"
}
}
},
{
"strings": {
"match_mapping_type": "string",
"mapping": {
"type": "text",
"fields": {
"raw": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
],
"properties": {
"ip_addr": {
"type": "ip"
}
}
}
}
PUT my-index-000002
{
"mappings": {
"dynamic_templates": [
{
"integers": {
"match_mapping_type": "long",
"mapping": {
"type": "integer"
}
}
},
{
"strings": {
"match_mapping_type": "string",
"mapping": {
"type": "text",
"fields": {
"raw": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
]
}
}
PUT my-index-000001/_doc/1
{
"ip_addr": "192.168.1.1"
}
GET my-index-000001/_mapping
PUT my-index-000002/_doc/1
{
"ip_addr": "192.168.1.1"
}
GET my-index-000002/_mapping
Created
November 21, 2022 02:03
-
-
Save TomonoriSoejima/1fe7cc44fad73774bf32ca0d7521d645 to your computer and use it in GitHub Desktop.
dynamic_templates_test.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment