diff options
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java index 01708333ed5..378907eafd7 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java @@ -314,12 +314,14 @@ public class ContentSearchCluster extends TreeConfigProducer<AnyConfigProducer> private boolean hasIndexingModeStreaming(NewDocumentType type) { if (indexedCluster == null) return false; - return indexedCluster.schemas().get(type.getName()).getIndexMode() == SchemaInfo.IndexMode.STREAMING; + var schemaInfo = indexedCluster.schemas().get(type.getName()); + return (schemaInfo != null) && (schemaInfo.getIndexMode() == SchemaInfo.IndexMode.STREAMING); } private boolean hasIndexingModeIndexed(NewDocumentType type) { if (indexedCluster == null) return false; - return indexedCluster.schemas().get(type.getName()).getIndexMode() == SchemaInfo.IndexMode.INDEX; + var schemaInfo = indexedCluster.schemas().get(type.getName()); + return (schemaInfo != null) && (schemaInfo.getIndexMode() == SchemaInfo.IndexMode.INDEX); } private boolean hasIndexingModeStoreOnly(NewDocumentType type) { |