Created
May 10, 2012 08:42
-
-
Save sfussenegger/2651930 to your computer and use it in GitHub Desktop.
Elasticsearch object mapping creating an aggregated index with the object's name
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
{ | |
"city" : { | |
"properties" : { | |
"country" : { | |
"properties" : { | |
"code" : { | |
"type" : "multi_field", | |
"path" : "just_name", | |
"fields" : { | |
"code" : { | |
"type" : "string", | |
"index_name" : "country.code" | |
}, | |
"country" : { | |
"type" : "string", | |
"include_in_all" : false | |
} | |
} | |
}, | |
"name" : { | |
"type" : "multi_field", | |
"path" : "just_name", | |
"fields" : { | |
"name" : { | |
"type" : "string", | |
"index_name" : "country.name" | |
}, | |
"country" : { | |
"type" : "string", | |
"include_in_all" : false | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment