Package com.yahoo.vespa.model.search
Class IndexedSearchCluster
- java.lang.Object
-
- com.yahoo.config.model.producer.AbstractConfigProducer
-
- com.yahoo.vespa.model.search.AbstractSearchCluster
-
- 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.vespa.config.search.DispatchConfig.Producer
,com.yahoo.vespa.configdefinition.IlscriptsConfig.Producer
,ConfigProducer
,java.io.Serializable
public class IndexedSearchCluster extends SearchCluster implements com.yahoo.prelude.fastsearch.DocumentdbInfoConfig.Producer, com.yahoo.search.config.IndexInfoConfig.Producer, com.yahoo.vespa.configdefinition.IlscriptsConfig.Producer, com.yahoo.vespa.config.search.DispatchConfig.Producer
- Author:
- baldersheim
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IndexedSearchCluster.UnionConfiguration
Class used to retrieve combined configuration from multiple document databases.-
Nested classes/interfaces inherited from class com.yahoo.vespa.model.search.AbstractSearchCluster
AbstractSearchCluster.IndexingMode, AbstractSearchCluster.SchemaSpec
-
-
Field Summary
-
Fields inherited from class com.yahoo.vespa.model.search.AbstractSearchCluster
clusterName, index
-
Fields inherited from class com.yahoo.config.model.producer.AbstractConfigProducer
log
-
-
Constructor Summary
Constructors Constructor Description IndexedSearchCluster(AbstractConfigProducer parent, java.lang.String clusterName, int index, DeployState deployState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSearcher(SearchNode searcher)
void
defaultDocumentsConfig()
Create default config if not specified by user.protected void
deriveAllSchemas(java.util.List<AbstractSearchCluster.SchemaSpec> localSearches, DeployState deployState)
void
fillDocumentDBConfig(java.lang.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.vespa.config.search.AttributesConfig.Builder builder)
void
getConfig(com.yahoo.vespa.config.search.DispatchConfig.Builder builder)
void
getConfig(com.yahoo.vespa.config.search.RankProfilesConfig.Builder builder)
void
getConfig(com.yahoo.vespa.configdefinition.IlscriptsConfig.Builder builder)
DispatchSpec
getDispatchSpec()
java.util.List<DocumentDatabase>
getDocumentDbs()
java.lang.String
getIndexingChainName()
java.lang.String
getIndexingClusterName()
Returns the name of the docproc cluster running indexing for this search cluster.protected AbstractSearchCluster.IndexingMode
getIndexingMode()
java.lang.String
getIndexingServiceName()
DispatchGroup
getRootDispatch()
java.lang.String
getRoutingSelector()
Returns the document selector that is able to resolve what documents are to be routed to this search cluster.int
getRowBits()
DerivedConfiguration
getSdConfig()
int
getSearchableCopies()
SearchNode
getSearchNode(int index)
int
getSearchNodeCount()
java.util.List<SearchNode>
getSearchNodes()
Tuning
getTuning()
boolean
hasDocumentDB(java.lang.String name)
boolean
hasExplicitIndexingChain()
boolean
hasExplicitIndexingCluster()
void
setDispatchSpec(DispatchSpec dispatchSpec)
AbstractSearchCluster
setIndexingChain(DocprocChain chain)
Sets the docproc chain that will be running indexing for this search cluster.void
setIndexingChainName(java.lang.String indexingChainName)
void
setIndexingClusterName(java.lang.String name)
Sets the name of the docproc cluster running indexing for this search cluster.void
setMaxNodesDownPerFixedRow(int value)
void
setRoutingSelector(java.lang.String sel)
void
setSearchableCopies(int searchableCopies)
void
setSearchCoverage(SearchCoverage searchCoverage)
void
setTuning(Tuning tuning)
-
Methods inherited from class com.yahoo.vespa.model.search.SearchCluster
addRankProfilesConfig, convertSummaryConfig, deriveSchemas
-
Methods inherited from class com.yahoo.vespa.model.search.AbstractSearchCluster
addDocumentNames, getClusterIndex, getClusterName, getDocumentNames, getIndexingModeName, getLocalSDS, getQueryTimeout, getVisibilityDelay, isRealtime, isStreaming, prepareToDistributeFiles, setClusterIndex, setQueryTimeout, setVisibilityDelay, toString
-
Methods inherited from class com.yahoo.config.model.producer.AbstractConfigProducer
addChild, addConfigId, addDescendantService, addUserConfig, cascadeConfig, dump, getChildren, getChildrenByTypeRecursive, getConfigClassLoader, getConfigId, getDescendantServices, getMonitoringService, getParent, getRoot, getSubId, getUserConfigs, hostSystem, mergeUserConfigs, removeChild, setParent, setUserConfigs, stateIsHosted, validate
-
-
-
-
Constructor Detail
-
IndexedSearchCluster
public IndexedSearchCluster(AbstractConfigProducer parent, java.lang.String clusterName, int index, DeployState deployState)
-
-
Method Detail
-
getRoutingSelector
public java.lang.String 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
protected AbstractSearchCluster.IndexingMode getIndexingMode()
- Specified by:
getIndexingMode
in classAbstractSearchCluster
-
hasExplicitIndexingCluster
public final boolean hasExplicitIndexingCluster()
-
hasExplicitIndexingChain
public final boolean hasExplicitIndexingChain()
-
getIndexingClusterName
public java.lang.String 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
public java.lang.String getIndexingChainName()
-
setIndexingChainName
public void setIndexingChainName(java.lang.String indexingChainName)
-
setIndexingClusterName
public void setIndexingClusterName(java.lang.String name)
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
public java.lang.String getIndexingServiceName()
-
setIndexingChain
public AbstractSearchCluster setIndexingChain(DocprocChain chain)
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
public DispatchGroup getRootDispatch()
-
addSearcher
public void addSearcher(SearchNode searcher)
-
getSearchNodes
public java.util.List<SearchNode> getSearchNodes()
-
getSearchNodeCount
public int getSearchNodeCount()
-
getSearchNode
public SearchNode getSearchNode(int index)
-
setTuning
public void setTuning(Tuning tuning)
-
getTuning
public Tuning getTuning()
-
fillDocumentDBConfig
public void fillDocumentDBConfig(java.lang.String documentType, com.yahoo.vespa.config.search.core.ProtonConfig.Documentdb.Builder builder)
-
getConfig
public void getConfig(com.yahoo.prelude.fastsearch.DocumentdbInfoConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.prelude.fastsearch.DocumentdbInfoConfig.Producer
- Specified by:
getConfig
in classAbstractSearchCluster
-
setRoutingSelector
public void setRoutingSelector(java.lang.String sel)
-
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
-
deriveAllSchemas
protected void deriveAllSchemas(java.util.List<AbstractSearchCluster.SchemaSpec> localSearches, DeployState deployState)
- Specified by:
deriveAllSchemas
in classSearchCluster
-
getDocumentDbs
public java.util.List<DocumentDatabase> getDocumentDbs()
-
hasDocumentDB
public boolean hasDocumentDB(java.lang.String name)
-
setSearchCoverage
public void setSearchCoverage(SearchCoverage searchCoverage)
-
getSdConfig
public DerivedConfiguration getSdConfig()
- Specified by:
getSdConfig
in classSearchCluster
-
getConfig
public void getConfig(com.yahoo.search.config.IndexInfoConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.search.config.IndexInfoConfig.Producer
- Overrides:
getConfig
in classSearchCluster
-
getConfig
public void getConfig(com.yahoo.vespa.configdefinition.IlscriptsConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.vespa.configdefinition.IlscriptsConfig.Producer
- Overrides:
getConfig
in classSearchCluster
-
getConfig
public void getConfig(com.yahoo.vespa.config.search.AttributesConfig.Builder builder)
- Overrides:
getConfig
in classSearchCluster
-
getConfig
public void getConfig(com.yahoo.vespa.config.search.RankProfilesConfig.Builder builder)
- Overrides:
getConfig
in classSearchCluster
-
setMaxNodesDownPerFixedRow
public void setMaxNodesDownPerFixedRow(int value)
-
getSearchableCopies
public int getSearchableCopies()
-
setSearchableCopies
public void setSearchableCopies(int searchableCopies)
-
setDispatchSpec
public void setDispatchSpec(DispatchSpec dispatchSpec)
-
getDispatchSpec
public DispatchSpec getDispatchSpec()
-
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 classAbstractSearchCluster
-
-