This repository was archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Can't handle _source-fields with point (".") inside field-name #89
Copy link
Copy link
Open
Description
elasticsearch-carrot2/src/main/java/org/carrot2/elasticsearch/ClusteringAction.java
Lines 1108 to 1124 in a027f04
String[] fieldNames = spec.field.split("\\."); | |
Object value = sourceAsMap; | |
// Descend into maps. | |
for (String fieldName : fieldNames) { | |
if (Map.class.isInstance(value)) { | |
value = ((Map<?, ?>) value).get(fieldName); | |
if (value == null) { | |
// No such key. | |
logger.warn( | |
"Cannot find field named '{}' from spec: '{}'", fieldName, spec.field); | |
break outer; | |
} | |
} else { | |
logger.warn("Field is not a map: {} in spec.: {}", fieldName, spec.field); | |
break outer; | |
} |
_source-fields with point (".") inside field-name are not correct handled.
E.g. following field_mapping will fail, because point inside "text.title"
"field_mapping": {
"title" : ["_source.text.title"]
}
Metadata
Metadata
Assignees
Labels
No labels