Skip to content

Commit 64e18a7

Browse files
author
Luc Boutier
committed
Fixing path prefix in elastic search mapper.
1 parent 7e9ada4 commit 64e18a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

elasticsearch-mapping/src/main/java/org/elasticsearch/mapping/parser/ObjectFieldAnnotationParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public void parseAnnotation(ObjectField annotation, Map<String, Object> fieldDef
4444
// nested types can provide replacement class to be managed. This can be usefull to override map default type for example.
4545
Class<?> replaceClass = objectClass.equals(ObjectField.class) ? indexable.getType() : objectClass;
4646
try {
47-
this.fieldsMappingBuilder.parseFieldMappings(replaceClass, fieldDefinition, facets, filters, fetchContext, indexable.getName() + ".",
48-
nestedPrefix);
47+
String newPrefix = pathPrefix == null ? indexable.getName() + "." : pathPrefix + indexable.getName() + ".";
48+
this.fieldsMappingBuilder.parseFieldMappings(replaceClass, fieldDefinition, facets, filters, fetchContext, newPrefix, nestedPrefix);
4949
} catch (IntrospectionException e) {
5050
LOGGER.error("Fail to parse object class <" + replaceClass.getName() + ">", e);
5151
}

0 commit comments

Comments
 (0)