public class RetrieveAndRank extends WatsonService implements ClusterLifecycleManager, SolrConfigManager
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION| Constructor and Description |
|---|
RetrieveAndRank()
Instantiates a new ranker client.
|
RetrieveAndRank(String username,
String password)
Instantiates a new ranker service by username and password.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceCall<Ranker> |
createRanker(String name,
File training)
Sends data to create and train a ranker, and returns information about the new ranker.
|
ServiceCall<SolrCluster> |
createSolrCluster()
Creates a new Solr cluster.
|
ServiceCall<SolrCluster> |
createSolrCluster(SolrClusterOptions config)
Creates a new Solr cluster, based on the provided configuration.
|
ServiceCall<Void> |
deleteRanker(String rankerID)
Deletes a ranker.
|
ServiceCall<Void> |
deleteSolrCluster(String solrClusterId)
Deletes an existing Solr Cluster
SolrCluster. |
ServiceCall<Void> |
deleteSolrClusterConfiguration(String solrClusterId,
String configName)
Deletes a configuration namespace in ZooKeeper.
|
ServiceCall<Rankers> |
getRankers()
retrieves the list of rankers for the user.
|
ServiceCall<Ranker> |
getRankerStatus(String rankerID)
Retrieves the status of a ranker.
|
ServiceCall<SolrCluster> |
getSolrCluster(String solrClusterId)
Returns a Solr cluster information.
|
ServiceCall<InputStream> |
getSolrClusterConfiguration(String solrClusterId,
String configName)
Gets the configuration from ZooKeeper.
|
ServiceCall<SolrConfigs> |
getSolrClusterConfigurations(String solrClusterId)
Lists the configuration sets in ZooKeeper.
|
ServiceCall<SolrClusterSizeResponse> |
getSolrClusterResizeStatus(String solrClusterId)
Get the status of a resize request for a cluster.
|
ServiceCall<SolrClusters> |
getSolrClusters()
Lists all Solr clusters currently associated with the service instance.
|
ServiceCall<SolrClusterStats> |
getSolrClusterStats(String solrClusterId)
Gathers memory and disk usage stats from a Solr cluster.
|
String |
getSolrUrl(String solrClusterId)
This URL can be used with the SolrJ library to access Solr functionality.
|
ServiceCall<Ranking> |
rank(String rankerID,
File answers,
Integer topAnswers)
Gets and returns the ranked answers.
|
ServiceCall<Ranking> |
rank(String rankerID,
InputStream answers,
Integer topAnswers)
Gets and returns the ranked answers.
|
ServiceCall<SolrClusterSizeResponse> |
resizeSolrCluster(String solrClusterId,
int requestedSize)
Change the size of the Solr cluster.
|
ServiceCall<Void> |
uploadSolrClusterConfigurationDirectory(String solrClusterId,
String configName,
File directory)
Uploads a configuration
File to ZooKeeper's namespace, including schema.xml, solrconfig.xml, and all other
necessary config files to configure a SolrCloud collection. |
ServiceCall<Void> |
uploadSolrClusterConfigurationZip(String solrClusterId,
String configName,
File zippedConfig)
Uploads a configuration ZIP
File to ZooKeeper's namespace, including schema.xml, solrconfig.xml, and all
other necessary config files to configure a SolrCloud collection. |
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toStringpublic ServiceCall<Ranker> createRanker(String name, File training)
name - Name of the rankertraining - The file with the training data i.e., the set of (qid, feature values, and rank) tuplesRankerpublic ServiceCall<SolrCluster> createSolrCluster()
ClusterLifecycleManagercreateSolrCluster in interface ClusterLifecycleManagerpublic ServiceCall<SolrCluster> createSolrCluster(SolrClusterOptions config)
ClusterLifecycleManagercreateSolrCluster in interface ClusterLifecycleManagerconfig - the solr cluster configurationpublic ServiceCall<Void> deleteRanker(String rankerID)
rankerID - the ranker idpublic ServiceCall<Void> deleteSolrCluster(String solrClusterId)
ClusterLifecycleManagerSolrCluster. deleteSolrCluster in interface ClusterLifecycleManagersolrClusterId - the Solr cluster idpublic ServiceCall<Void> deleteSolrClusterConfiguration(String solrClusterId, String configName)
SolrConfigManagerdeleteSolrClusterConfiguration in interface SolrConfigManagersolrClusterId - the solr cluster idconfigName - the name of the configuration in ZooKeeper.public ServiceCall<Rankers> getRankers()
public ServiceCall<Ranker> getRankerStatus(String rankerID)
rankerID - the ranker IDRankerpublic ServiceCall<SolrCluster> getSolrCluster(String solrClusterId)
ClusterLifecycleManagergetSolrCluster in interface ClusterLifecycleManagersolrClusterId - the Solr cluster idpublic ServiceCall<InputStream> getSolrClusterConfiguration(String solrClusterId, String configName)
SolrConfigManagergetSolrClusterConfiguration in interface SolrConfigManagersolrClusterId - the solr cluster idconfigName - the name of the configuration in ZooKeeperpublic ServiceCall<SolrConfigs> getSolrClusterConfigurations(String solrClusterId)
SolrConfigManagergetSolrClusterConfigurations in interface SolrConfigManagersolrClusterId - the solr cluster idpublic ServiceCall<SolrClusters> getSolrClusters()
ClusterLifecycleManagergetSolrClusters in interface ClusterLifecycleManagerpublic ServiceCall<SolrClusterStats> getSolrClusterStats(String solrClusterId)
solrClusterId - the ID of the Solr cluster to gather stats frompublic String getSolrUrl(String solrClusterId)
solrClusterId - the ID of the Solr cluster to connect topublic ServiceCall<Ranking> rank(String rankerID, File answers, Integer topAnswers)
rankerID - The ranker IDanswers - The CSV file that contains the search results that you want to rank.topAnswers - The number of top answers needed, default is 10public ServiceCall<Ranking> rank(String rankerID, InputStream answers, Integer topAnswers)
rankerID - The ranker IDanswers - The CSV input that contains the search results that you want to rank.topAnswers - The number of top answers needed, default is 10public ServiceCall<Void> uploadSolrClusterConfigurationDirectory(String solrClusterId, String configName, File directory)
SolrConfigManagerFile to ZooKeeper's namespace, including schema.xml, solrconfig.xml, and all other
necessary config files to configure a SolrCloud collection.
The configuration directory is sent to Solr as a ZIP file. For uploading a ZIP file directly, use
SolrConfigManager.uploadSolrClusterConfigurationZip(String, String, File) instead. Config files on the XSLT path will not be
uploaded.
uploadSolrClusterConfigurationDirectory in interface SolrConfigManagersolrClusterId - the solr cluster idconfigName - the name of the config in ZooKeeper. This name is used when referencing the config when creating
a collection.directory - the directory to upload.public ServiceCall<Void> uploadSolrClusterConfigurationZip(String solrClusterId, String configName, File zippedConfig)
SolrConfigManagerFile to ZooKeeper's namespace, including schema.xml, solrconfig.xml, and all
other necessary config files to configure a SolrCloud collection.
For uploading a directory, use SolrConfigManager.uploadSolrClusterConfigurationDirectory(String , String, File) instead.
Config files on the XSLT path will not be uploaded.
uploadSolrClusterConfigurationZip in interface SolrConfigManagersolrClusterId - the solr cluster idconfigName - the name of the config in ZooKeeper. This name is used when referencing the config when creating
a collection.zippedConfig - the ZIP file to upload.public ServiceCall<SolrClusterSizeResponse> resizeSolrCluster(String solrClusterId, int requestedSize)
ClusterLifecycleManagerresizeSolrCluster in interface ClusterLifecycleManagersolrClusterId - the solr cluster idrequestedSize - the requested sizepublic ServiceCall<SolrClusterSizeResponse> getSolrClusterResizeStatus(String solrClusterId)
ClusterLifecycleManagergetSolrClusterResizeStatus in interface ClusterLifecycleManagersolrClusterId - the solr cluster idCopyright © 2015–2016 IBM Watson. All rights reserved.