@@ -172,8 +172,8 @@ private void checkDocumentId(XProperty member,
172
172
return ;
173
173
}
174
174
175
- String attributeName = getIdAttributeName ( member , idAnnotation );
176
- String path = prefix + attributeName ;
175
+ final String unprefixedAttributeName = getIdAttributeName ( member , idAnnotation );
176
+ final String path = prefix + unprefixedAttributeName ;
177
177
if ( isRoot ) {
178
178
createIdPropertyMetadata (
179
179
member ,
@@ -182,7 +182,8 @@ private void checkDocumentId(XProperty member,
182
182
configContext ,
183
183
parseContext ,
184
184
idAnnotation ,
185
- path
185
+ path ,
186
+ unprefixedAttributeName
186
187
);
187
188
}
188
189
else {
@@ -237,7 +238,8 @@ private void createIdPropertyMetadata(XProperty member,
237
238
ConfigContext configContext ,
238
239
ParseContext parseContext ,
239
240
Annotation idAnnotation ,
240
- String path ) {
241
+ String path ,
242
+ String unprefixedAttributeName ) {
241
243
if ( parseContext .isExplicitDocumentId () ) {
242
244
if ( idAnnotation instanceof DocumentId ) {
243
245
throw log .duplicateDocumentIdFound ( typeMetadataBuilder .getIndexedType ().getName () );
@@ -251,7 +253,7 @@ private void createIdPropertyMetadata(XProperty member,
251
253
parseContext .setExplicitDocumentId ( true );
252
254
}
253
255
254
- NumericField numericFieldAnnotation = numericFields .getNumericFieldAnnotation ( path );
256
+ NumericField numericFieldAnnotation = numericFields .getNumericFieldAnnotation ( unprefixedAttributeName );
255
257
256
258
// Don't apply @NumericField if it is given with the default name and there is another custom @Field
257
259
if ( numericFieldAnnotation != null && numericFieldAnnotation .forField ().isEmpty ()
@@ -1013,7 +1015,8 @@ private void bindFieldAnnotation(
1013
1015
typeMetadataBuilder .disableStateInspectionOptimization ();
1014
1016
}
1015
1017
1016
- String fieldName = prefix + ReflectionHelper .getAttributeName ( member , fieldAnnotation .name () );
1018
+ final String unPrefixedFieldName = ReflectionHelper .getAttributeName ( member , fieldAnnotation .name () );
1019
+ final String fieldName = prefix + unPrefixedFieldName ;
1017
1020
Store store = fieldAnnotation .store ();
1018
1021
Field .Index index = AnnotationProcessingHelper .getIndex (
1019
1022
fieldAnnotation .index (),
@@ -1022,7 +1025,7 @@ private void bindFieldAnnotation(
1022
1025
);
1023
1026
Field .TermVector termVector = AnnotationProcessingHelper .getTermVector ( fieldAnnotation .termVector () );
1024
1027
1025
- NumericField numericFieldAnnotation = numericFields .getNumericFieldAnnotation ( fieldName );
1028
+ NumericField numericFieldAnnotation = numericFields .getNumericFieldAnnotation ( unPrefixedFieldName );
1026
1029
1027
1030
FieldBridge fieldBridge = bridgeFactory .buildFieldBridge (
1028
1031
fieldAnnotation ,
0 commit comments