Skip to content

Commit ec91a34

Browse files
committed
Fixed text field encoded value in ignored source
1 parent 798d91f commit ec91a34

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

server/src/main/java/org/elasticsearch/index/mapper/TextFieldMapper.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,11 +1434,7 @@ protected void parseCreateField(DocumentParserContext context) throws IOExceptio
14341434
}
14351435

14361436
// otherwise, store this field in Lucene so that synthetic source can load it
1437-
var utfBytes = context.parser().optimizedTextOrNull().bytes();
1438-
var valuesBytesRef = new BytesRef(utfBytes.bytes(), utfBytes.offset(), utfBytes.length());
1439-
context.storeFieldForSyntheticSource(fullPath(), leafName(), valuesBytesRef, context.doc());
1440-
// final String fieldName = fieldType().syntheticSourceFallbackFieldName();
1441-
// context.doc().add(new StoredField(fieldName, value));
1437+
context.storeFieldForSyntheticSource(fullPath(), leafName(), context.encodeFlattenedToken(), context.doc());
14421438
}
14431439
}
14441440

0 commit comments

Comments
 (0)