diff --git a/server/src/main/java/org/elasticsearch/index/engine/InternalEngine.java b/server/src/main/java/org/elasticsearch/index/engine/InternalEngine.java index b7502cb0363c3..214b6bc14c65c 100644 --- a/server/src/main/java/org/elasticsearch/index/engine/InternalEngine.java +++ b/server/src/main/java/org/elasticsearch/index/engine/InternalEngine.java @@ -2756,9 +2756,9 @@ private IndexWriterConfig getIndexWriterConfig() { private boolean useSyntheticSourceForRecovery() { return engineConfig.getMapperService() != null + && engineConfig.getMapperService().mappingLookup() != null && engineConfig.getMapperService().mappingLookup().isSourceSynthetic() && engineConfig.getIndexSettings().isRecoverySourceSyntheticEnabled(); - } /** A listener that warms the segments if needed when acquiring a new reader */