Package com.yahoo.vespa.model.search
Class IndexedSearchCluster
java.lang.Object
com.yahoo.config.model.producer.AnyConfigProducer
com.yahoo.config.model.producer.TreeConfigProducer<AnyConfigProducer>
com.yahoo.vespa.model.search.SearchCluster
com.yahoo.vespa.model.search.IndexedSearchCluster
- All Implemented Interfaces:
com.yahoo.config.ConfigInstance.Producer
,com.yahoo.prelude.fastsearch.DocumentdbInfoConfig.Producer
,com.yahoo.search.config.IndexInfoConfig.Producer
,com.yahoo.search.config.SchemaInfoConfig.Producer
,com.yahoo.vespa.config.search.DispatchConfig.Producer
,com.yahoo.vespa.config.search.DispatchNodesConfig.Producer
,com.yahoo.vespa.configdefinition.IlscriptsConfig.Producer
,ConfigProducer
,Serializable
public class IndexedSearchCluster
extends SearchCluster
implements com.yahoo.prelude.fastsearch.DocumentdbInfoConfig.Producer, com.yahoo.search.config.IndexInfoConfig.Producer, com.yahoo.search.config.SchemaInfoConfig.Producer, com.yahoo.vespa.configdefinition.IlscriptsConfig.Producer, com.yahoo.vespa.config.search.DispatchConfig.Producer, com.yahoo.vespa.config.search.DispatchNodesConfig.Producer, com.yahoo.config.ConfigInstance.Producer
- Author:
- baldersheim
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Class used to retrieve combined configuration from multiple document databases.Nested classes/interfaces inherited from class com.yahoo.vespa.model.search.SearchCluster
SearchCluster.IndexingMode
-
Field Summary
Fields inherited from class com.yahoo.config.model.producer.AnyConfigProducer
log
-
Constructor Summary
ConstructorDescriptionIndexedSearchCluster
(TreeConfigProducer<AnyConfigProducer> parent, String clusterName, int index, com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSearcher
(SearchNode searcher) void
Create default config if not specified by user.void
deriveFromSchemas
(DeployState deployState) Must be called after cluster is built, to derive schema configs.void
fillDocumentDBConfig
(String documentType, com.yahoo.vespa.config.search.core.ProtonConfig.Documentdb.Builder builder) void
getConfig
(com.yahoo.prelude.fastsearch.DocumentdbInfoConfig.Builder builder) void
getConfig
(com.yahoo.search.config.IndexInfoConfig.Builder builder) void
getConfig
(com.yahoo.search.config.SchemaInfoConfig.Builder builder) void
getConfig
(com.yahoo.vespa.config.search.AttributesConfig.Builder builder) void
getConfig
(com.yahoo.vespa.config.search.DispatchConfig.Builder builder) void
getConfig
(com.yahoo.vespa.config.search.DispatchNodesConfig.Builder builder) void
getConfig
(com.yahoo.vespa.config.search.RankProfilesConfig.Builder builder) void
getConfig
(com.yahoo.vespa.configdefinition.IlscriptsConfig.Builder builder) Returns the name of the docproc cluster running indexing for this search cluster.protected SearchCluster.IndexingMode
int
Returns the document selector that is able to resolve what documents are to be routed to this search cluster.int
int
getSearchNode
(int index) int
boolean
hasDocumentDB
(String name) final boolean
final boolean
void
setDispatchSpec
(DispatchSpec dispatchSpec) setIndexingChain
(DocprocChain chain) Sets the docproc chain that will be running indexing for this search cluster.void
setIndexingChainName
(String indexingChainName) void
setIndexingClusterName
(String name) Sets the name of the docproc cluster running indexing for this search cluster.void
setRedundancy
(int redundancy) void
setRoutingSelector
(String selector) void
setSearchableCopies
(int searchableCopies) void
setSearchCoverage
(SearchCoverage searchCoverage) void
toString()
Methods inherited from class com.yahoo.vespa.model.search.SearchCluster
add, getClusterIndex, getClusterName, getDocumentNames, getIndexingModeName, getQueryTimeout, getVisibilityDelay, isStreaming, schemas, setClusterIndex, setQueryTimeout, setVisibilityDelay
Methods inherited from class com.yahoo.config.model.producer.TreeConfigProducer
addChild, addDescendantService, getChildren, getChildrenByTypeRecursive, getConfigClassLoader, getDescendantServices, removeChild, validate
Methods inherited from class com.yahoo.config.model.producer.AnyConfigProducer
addConfigId, addUserConfig, cascadeConfig, currentConfigId, findInheritedClassLoader, getConfigId, getMonitoringService, getParent, getRoot, getSubId, getUserConfigs, hostSystem, mergeUserConfigs, remove, setParent, setUserConfigs, stateIsHosted
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.yahoo.vespa.model.ConfigProducer
dump
-
Constructor Details
-
IndexedSearchCluster
public IndexedSearchCluster(TreeConfigProducer<AnyConfigProducer> parent, String clusterName, int index, com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags)
-
-
Method Details
-
getRoutingSelector
Returns the document selector that is able to resolve what documents are to be routed to this search cluster. This string uses the document selector language as defined in the "document" module.- Returns:
- the document selector
-
getIndexingMode
- Specified by:
getIndexingMode
in classSearchCluster
-
hasExplicitIndexingCluster
public final boolean hasExplicitIndexingCluster() -
hasExplicitIndexingChain
public final boolean hasExplicitIndexingChain() -
getIndexingClusterName
Returns the name of the docproc cluster running indexing for this search cluster. This is derived from the services file on initialization, this can NOT be used at runtime to determine indexing chain. When initialization is done, thegetIndexingServiceName()
method holds the actual indexing docproc chain object.- Returns:
- the name of the docproc cluster associated with this
-
getIndexingChainName
-
setIndexingChainName
-
setIndexingClusterName
Sets the name of the docproc cluster running indexing for this search cluster. This is for initial configuration, and will not reflect the actual indexing chain. SeegetIndexingClusterName()
for more detail.- Parameters:
name
- the name of the docproc cluster associated with this
-
getIndexingServiceName
-
setIndexingChain
Sets the docproc chain that will be running indexing for this search cluster. This is set by theContent
model during build.- Parameters:
chain
- the chain that is to run indexing for this cluster- Returns:
- this, to allow chaining
-
getRootDispatch
-
addSearcher
-
getSearchNodes
-
getSearchNodeCount
public int getSearchNodeCount() -
getSearchNode
-
setTuning
-
getTuning
-
fillDocumentDBConfig
public void fillDocumentDBConfig(String documentType, com.yahoo.vespa.config.search.core.ProtonConfig.Documentdb.Builder builder) -
setRoutingSelector
-
defaultDocumentsConfig
public void defaultDocumentsConfig()Create default config if not specified by user. Accept empty strings as user config - it means that all feeds/documents are accepted.- Specified by:
defaultDocumentsConfig
in classSearchCluster
-
deriveFromSchemas
Description copied from class:SearchCluster
Must be called after cluster is built, to derive schema configs. Derives the schemas from the application package. Also stores the document names contained in the schemas.- Specified by:
deriveFromSchemas
in classSearchCluster
-
getDocumentDbs
-
hasDocumentDB
-
setSearchCoverage
-
getConfig
public void getConfig(com.yahoo.prelude.fastsearch.DocumentdbInfoConfig.Builder builder) - Specified by:
getConfig
in interfacecom.yahoo.prelude.fastsearch.DocumentdbInfoConfig.Producer
-
getConfig
public void getConfig(com.yahoo.search.config.IndexInfoConfig.Builder builder) - Specified by:
getConfig
in interfacecom.yahoo.search.config.IndexInfoConfig.Producer
-
getConfig
public void getConfig(com.yahoo.search.config.SchemaInfoConfig.Builder builder) - Specified by:
getConfig
in interfacecom.yahoo.search.config.SchemaInfoConfig.Producer
-
getConfig
public void getConfig(com.yahoo.vespa.configdefinition.IlscriptsConfig.Builder builder) - Specified by:
getConfig
in interfacecom.yahoo.vespa.configdefinition.IlscriptsConfig.Producer
-
getConfig
public void getConfig(com.yahoo.vespa.config.search.AttributesConfig.Builder builder) - Specified by:
getConfig
in classSearchCluster
-
getConfig
public void getConfig(com.yahoo.vespa.config.search.RankProfilesConfig.Builder builder) - Specified by:
getConfig
in classSearchCluster
-
getSearchableCopies
public int getSearchableCopies() -
setSearchableCopies
public void setSearchableCopies(int searchableCopies) -
getRedundancy
public int getRedundancy() -
setRedundancy
public void setRedundancy(int redundancy) -
setDispatchSpec
-
getDispatchSpec
-
getConfig
public void getConfig(com.yahoo.vespa.config.search.DispatchNodesConfig.Builder builder) - Specified by:
getConfig
in interfacecom.yahoo.vespa.config.search.DispatchNodesConfig.Producer
-
getConfig
public void getConfig(com.yahoo.vespa.config.search.DispatchConfig.Builder builder) - Specified by:
getConfig
in interfacecom.yahoo.vespa.config.search.DispatchConfig.Producer
-
getRowBits
public int getRowBits()- Specified by:
getRowBits
in classSearchCluster
-
toString
- Overrides:
toString
in classSearchCluster
-