diff --git a/es/mappings.json b/es/mappings.json index fe3fc2693..ef4858199 100644 --- a/es/mappings.json +++ b/es/mappings.json @@ -377,6 +377,34 @@ "copy_to": [ "collector.default" ] + }, + "ref": { + "type": "text", + "index": false, + "copy_to": [ + "collector.default" + ] + }, + "left": { + "type": "text", + "index": false, + "copy_to": [ + "collector.default" + ] + }, + "right": { + "type": "text", + "index": false, + "copy_to": [ + "collector.default" + ] + }, + "short": { + "type": "text", + "index": false, + "copy_to": [ + "collector.default" + ] } } }, diff --git a/src/main/java/de/komoot/photon/Utils.java b/src/main/java/de/komoot/photon/Utils.java index 62f1f0124..9c3dc1380 100644 --- a/src/main/java/de/komoot/photon/Utils.java +++ b/src/main/java/de/komoot/photon/Utils.java @@ -93,6 +93,18 @@ private static void writeName(XContentBuilder builder, Map name, if (name.get("reg_name") != null) fNames.put("reg", name.get("reg_name")); + if (name.get("short_name") != null) + fNames.put("short", name.get("short_name")); + + if (name.get("name:left") != null) + fNames.put("left", name.get("name:left")); + + if (name.get("name:right") != null) + fNames.put("right", name.get("name:left")); + + if (name.get("ref") != null) + fNames.put("ref", name.get("ref")); + write(builder, fNames, "name"); }