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 | 15 |
1 files changed, 3 insertions, 12 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 1420cd82247..0027a9ca45c 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 @@ -58,7 +58,7 @@ public class ContentSearchCluster extends TreeConfigProducer<AnyConfigProducer> /** The single, indexed search cluster this sets up (supporting multiple document types), or null if none */ private IndexedSearchCluster indexedCluster; - private Optional<IndexingDocproc> indexingDocproc; + private final IndexingDocproc indexingDocproc; private Redundancy redundancy; private final String clusterName; @@ -208,7 +208,7 @@ public class ContentSearchCluster extends TreeConfigProducer<AnyConfigProducer> double fractionOfMemoryReserved) { super(parent, "search"); - this.indexingDocproc = Optional.empty(); + this.indexingDocproc = new IndexingDocproc(); this.clusterName = clusterName; this.documentDefinitions = documentDefinitions; this.globallyDistributedDocuments = globallyDistributedDocuments; @@ -262,10 +262,6 @@ public class ContentSearchCluster extends TreeConfigProducer<AnyConfigProducer> throw new IllegalArgumentException("Duplicate indexed cluster '" + indexedCluster.getClusterName() + "'"); } indexedCluster = (IndexedSearchCluster)sc; - if (indexingDocproc.isPresent()) { - throw new IllegalArgumentException("Indexing docproc has previously been setup for streaming search"); - } - indexingDocproc = Optional.of(indexedCluster.getIndexingDocproc()); } clusters.put(sc.getClusterName(), sc); } @@ -483,12 +479,7 @@ public class ContentSearchCluster extends TreeConfigProducer<AnyConfigProducer> public Map<String, SearchCluster> getClusters() { return clusters; } public IndexedSearchCluster getIndexed() { return indexedCluster; } public boolean hasIndexedCluster() { return indexedCluster != null; } - public Optional<IndexingDocproc> getIndexingDocproc() { return indexingDocproc; } - public void setupStreamingSearchIndexingDocProc() { - if (indexingDocproc.isEmpty()) { - indexingDocproc = Optional.of(new IndexingDocproc()); - } - } + public IndexingDocproc getIndexingDocproc() { return indexingDocproc; } public String getClusterName() { return clusterName; } @Override |