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(java.lang.String username,
java.lang.String password)
Instantiates a new ranker service by username and password.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceCall<Ranker> |
createRanker(java.lang.String name,
java.io.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<java.lang.Void> |
deleteRanker(java.lang.String rankerID)
Deletes a ranker.
|
ServiceCall<java.lang.Void> |
deleteSolrCluster(java.lang.String solrClusterId)
Deletes an existing Solr Cluster
SolrCluster. |
ServiceCall<java.lang.Void> |
deleteSolrClusterConfiguration(java.lang.String solrClusterId,
java.lang.String configName)
Deletes a configuration namespace in ZooKeeper.
|
ServiceCall<Rankers> |
getRankers()
retrieves the list of rankers for the user.
|
ServiceCall<Ranker> |
getRankerStatus(java.lang.String rankerID)
Retrieves the status of a ranker.
|
ServiceCall<SolrCluster> |
getSolrCluster(java.lang.String solrClusterId)
Returns a Solr cluster information.
|
ServiceCall<java.io.InputStream> |
getSolrClusterConfiguration(java.lang.String solrClusterId,
java.lang.String configName)
Gets the configuration from ZooKeeper.
|
ServiceCall<SolrConfigs> |
getSolrClusterConfigurations(java.lang.String solrClusterId)
Lists the configuration sets in ZooKeeper.
|
ServiceCall<SolrClusterSizeResponse> |
getSolrClusterResizeStatus(java.lang.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(java.lang.String solrClusterId)
Gathers memory and disk usage stats from a Solr cluster.
|
java.lang.String |
getSolrUrl(java.lang.String solrClusterId)
This URL can be used with the SolrJ library to access Solr functionality.
|
ServiceCall<Ranking> |
rank(java.lang.String rankerID,
java.io.File answers,
java.lang.Integer topAnswers)
Gets and returns the ranked answers.
|
ServiceCall<Ranking> |
rank(java.lang.String rankerID,
java.io.InputStream answers,
java.lang.Integer topAnswers)
Gets and returns the ranked answers.
|
ServiceCall<SolrClusterSizeResponse> |
resizeSolrCluster(java.lang.String solrClusterId,
int requestedSize)
Change the size of the Solr cluster.
|
ServiceCall<java.lang.Void> |
uploadSolrClusterConfigurationDirectory(java.lang.String solrClusterId,
java.lang.String configName,
java.io.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<java.lang.Void> |
uploadSolrClusterConfigurationZip(java.lang.String solrClusterId,
java.lang.String configName,
java.io.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, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toStringpublic RetrieveAndRank()
public RetrieveAndRank(java.lang.String username,
java.lang.String password)
username - the usernamepassword - the passwordpublic ServiceCall<Ranker> createRanker(java.lang.String name, java.io.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<java.lang.Void> deleteRanker(java.lang.String rankerID)
rankerID - the ranker idpublic ServiceCall<java.lang.Void> deleteSolrCluster(java.lang.String solrClusterId)
ClusterLifecycleManagerSolrCluster. deleteSolrCluster in interface ClusterLifecycleManagersolrClusterId - the Solr cluster idpublic ServiceCall<java.lang.Void> deleteSolrClusterConfiguration(java.lang.String solrClusterId, java.lang.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(java.lang.String rankerID)
rankerID - the ranker IDRankerpublic ServiceCall<SolrCluster> getSolrCluster(java.lang.String solrClusterId)
ClusterLifecycleManagergetSolrCluster in interface ClusterLifecycleManagersolrClusterId - the Solr cluster idpublic ServiceCall<java.io.InputStream> getSolrClusterConfiguration(java.lang.String solrClusterId, java.lang.String configName)
SolrConfigManagergetSolrClusterConfiguration in interface SolrConfigManagersolrClusterId - the solr cluster idconfigName - the name of the configuration in ZooKeeperpublic ServiceCall<SolrConfigs> getSolrClusterConfigurations(java.lang.String solrClusterId)
SolrConfigManagergetSolrClusterConfigurations in interface SolrConfigManagersolrClusterId - the solr cluster idpublic ServiceCall<SolrClusters> getSolrClusters()
ClusterLifecycleManagergetSolrClusters in interface ClusterLifecycleManagerpublic ServiceCall<SolrClusterStats> getSolrClusterStats(java.lang.String solrClusterId)
solrClusterId - the ID of the Solr cluster to gather stats frompublic java.lang.String getSolrUrl(java.lang.String solrClusterId)
solrClusterId - the ID of the Solr cluster to connect topublic ServiceCall<Ranking> rank(java.lang.String rankerID, java.io.File answers, java.lang.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(java.lang.String rankerID, java.io.InputStream answers, java.lang.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<java.lang.Void> uploadSolrClusterConfigurationDirectory(java.lang.String solrClusterId, java.lang.String configName, java.io.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<java.lang.Void> uploadSolrClusterConfigurationZip(java.lang.String solrClusterId, java.lang.String configName, java.io.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(java.lang.String solrClusterId, int requestedSize)
ClusterLifecycleManagerresizeSolrCluster in interface ClusterLifecycleManagersolrClusterId - the solr cluster idrequestedSize - the requested sizepublic ServiceCall<SolrClusterSizeResponse> getSolrClusterResizeStatus(java.lang.String solrClusterId)
ClusterLifecycleManagergetSolrClusterResizeStatus in interface ClusterLifecycleManagersolrClusterId - the solr cluster id