Last active
March 17, 2016 15:27
-
-
Save ruflin/a39df26ea823a74713dd to your computer and use it in GitHub Desktop.
Dynamic mapping for name nested docs
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
{ | |
"fs": { | |
"disk1": { | |
"size": 175, | |
"name": "dis1" | |
}, | |
"disk2": { | |
"size": 1785, | |
"name": "dis2" | |
} | |
} | |
} | |
} | |
PUT my_index | |
{ | |
"mappings": { | |
"my_type": { | |
"dynamic_templates": [ | |
{ | |
"disk_size": { | |
"path_match": "fs.*.size", | |
"mapping": { | |
"type": "string", | |
} | |
} | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment