@@ -1221,14 +1221,6 @@ private boolean indexValue(DocumentParserContext context, String value) {
12211221 return indexValue (context , new Text (value ));
12221222 }
12231223
1224- /**
1225- * Returns whether this field should be stored separately as a {@link StoredField} for supporting synthetic source.
1226- */
1227- private boolean storeIgnoredValuesForSyntheticSource () {
1228- // skip all fields that are multi-fields
1229- return fieldType ().isSyntheticSourceEnabled && fieldType ().isWithinMultiField == false ;
1230- }
1231-
12321224 private boolean indexValue (DocumentParserContext context , XContentString value ) {
12331225 // nothing to index
12341226 if (value == null ) {
@@ -1240,11 +1232,12 @@ private boolean indexValue(DocumentParserContext context, XContentString value)
12401232 return false ;
12411233 }
12421234
1243- // if the value's length exceeds ignore_above, then don't index it
1244- if (value .stringLength () > fieldType ().ignoreAbove ()) {
1235+ // if the value's length exceeds ignore_above, then don't index it. Instead, store it in ignored source
1236+ // that being said, don't store multi fields in ignored source as thats the responsibility of the parent
1237+ if (value .stringLength () > fieldType ().ignoreAbove () && isWithinMultiField == false ) {
12451238 context .addIgnoredField (fullPath ());
1246- // unless, synthetic source is enabled, then store a copy of the value so that synthetic source be load it
1247- if (storeIgnoredValuesForSyntheticSource () ) {
1239+ // unless synthetic source is enabled, then store a copy of the value so that synthetic source be load it
1240+ if (fieldType (). isSyntheticSourceEnabled ) {
12481241 var utfBytes = value .bytes ();
12491242 var bytesRef = new BytesRef (utfBytes .bytes (), utfBytes .offset (), utfBytes .length ());
12501243 final String fieldName = fieldType ().syntheticSourceFallbackFieldName ();
0 commit comments