Skip to content

Commit

Permalink
add regional name to index
Browse files Browse the repository at this point in the history
  • Loading branch information
christophlingg committed Jan 12, 2015
1 parent 20167f3 commit a8bc9b2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
19 changes: 16 additions & 3 deletions es/mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"_all": {
"enabled": false
},
"_source" : {
"excludes" : ["context.*"]
},
"_source": {
"excludes": ["context.*"]
},
"_id": {
"path": "id"
},
Expand Down Expand Up @@ -107,6 +107,19 @@
"collector.default"
]
},
"reg": {
"type": "string",
"index": "no",
"fields": {
"raw": {
"index_analyzer": "index_raw",
"type": "string"
}
},
"copy_to": [
"collector.default"
]
},
"loc": {
"type": "string",
"index": "no",
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/de/komoot/photon/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ private static void writeName(XContentBuilder builder, Map<String, String> name,
if(name.get("old_name") != null)
fNames.put("old", name.get("old_name"));

if(name.get("reg_name") != null)
fNames.put("reg", name.get("reg_name"));

write(builder, fNames, "name");
}

Expand Down

0 comments on commit a8bc9b2

Please sign in to comment.