Skip to content

Commit a8bc9b2

Browse files
add regional name to index
1 parent 20167f3 commit a8bc9b2

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

es/mappings.json

+16-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"_all": {
55
"enabled": false
66
},
7-
"_source" : {
8-
"excludes" : ["context.*"]
9-
},
7+
"_source": {
8+
"excludes": ["context.*"]
9+
},
1010
"_id": {
1111
"path": "id"
1212
},
@@ -107,6 +107,19 @@
107107
"collector.default"
108108
]
109109
},
110+
"reg": {
111+
"type": "string",
112+
"index": "no",
113+
"fields": {
114+
"raw": {
115+
"index_analyzer": "index_raw",
116+
"type": "string"
117+
}
118+
},
119+
"copy_to": [
120+
"collector.default"
121+
]
122+
},
110123
"loc": {
111124
"type": "string",
112125
"index": "no",

src/main/java/de/komoot/photon/Utils.java

+3
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ private static void writeName(XContentBuilder builder, Map<String, String> name,
8787
if(name.get("old_name") != null)
8888
fNames.put("old", name.get("old_name"));
8989

90+
if(name.get("reg_name") != null)
91+
fNames.put("reg", name.get("reg_name"));
92+
9093
write(builder, fNames, "name");
9194
}
9295

0 commit comments

Comments
 (0)