aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-03-17 12:33:57 +0100
committerGitHub <noreply@github.com>2024-03-17 12:33:57 +0100
commit2e3832e4cf34f65ed24485f08b24a3370b97ee07 (patch)
tree8132c0c830741c4a4434bacb97349a47ab20140f
parent2e31a1f7b1f40c205d3033a535804443b8e412a0 (diff)
parent1a067c569c4daf55c23c89f60fae38e8759bc3b9 (diff)
Merge pull request #30665 from vespa-engine/revert-30663-balder/check-for-presence-first
Revert "Check that schema exists first."
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java6
1 files changed, 2 insertions, 4 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 378907eafd7..01708333ed5 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,14 +314,12 @@ public class ContentSearchCluster extends TreeConfigProducer<AnyConfigProducer>
private boolean hasIndexingModeStreaming(NewDocumentType type) {
if (indexedCluster == null) return false;
- var schemaInfo = indexedCluster.schemas().get(type.getName());
- return (schemaInfo != null) && (schemaInfo.getIndexMode() == SchemaInfo.IndexMode.STREAMING);
+ return indexedCluster.schemas().get(type.getName()).getIndexMode() == SchemaInfo.IndexMode.STREAMING;
}
private boolean hasIndexingModeIndexed(NewDocumentType type) {
if (indexedCluster == null) return false;
- var schemaInfo = indexedCluster.schemas().get(type.getName());
- return (schemaInfo != null) && (schemaInfo.getIndexMode() == SchemaInfo.IndexMode.INDEX);
+ return indexedCluster.schemas().get(type.getName()).getIndexMode() == SchemaInfo.IndexMode.INDEX;
}
private boolean hasIndexingModeStoreOnly(NewDocumentType type) {