Properly handle multi fields in block loaders with synthetic source enabled (#127483)

This commit is contained in:
Oleksandr Kolomiiets 2025-04-30 09:33:35 -07:00 committed by GitHub
parent ac6c7a958d
commit 0c1b3acee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 538 additions and 305 deletions

View file

@ -378,7 +378,8 @@ public class ScaledFloatFieldMapper extends FieldMapper {
if (hasDocValues() && (blContext.fieldExtractPreference() != FieldExtractPreference.STORED || isSyntheticSource)) {
return new BlockDocValuesReader.DoublesBlockLoader(name(), l -> l / scalingFactor);
}
if (isSyntheticSource) {
// Multi fields don't have fallback synthetic source.
if (isSyntheticSource && blContext.parentField(name()) == null) {
return new FallbackSyntheticSourceBlockLoader(fallbackSyntheticSourceBlockLoaderReader(), name()) {
@Override
public Builder builder(BlockFactory factory, int expectedCount) {