public class RetrieveAndRank extends WatsonService implements ClusterLifecycleManager, SolrConfigManager
VERSION| Constructor and Description | 
|---|
| RetrieveAndRank()Instantiates a new ranker client. | 
| Modifier and Type | Method and Description | 
|---|---|
| Ranker | createRanker(String name,
            File training)Sends data to create and train a ranker, and returns information about the new ranker. | 
| SolrCluster | createSolrCluster()Creates a new Solr cluster. | 
| SolrCluster | createSolrCluster(SolrClusterOptions config)Creates a new Solr cluster, based on the provided configuration. | 
| void | deleteRanker(String rankerID)Deletes a ranker. | 
| void | deleteSolrCluster(String solrClusterId)Deletes an existing Solr Cluster  SolrCluster. | 
| void | deleteSolrClusterConfiguration(String solrClusterId,
                              String configName)Deletes a configuration namespace in ZooKeeper. | 
| Rankers | getRankers()retrieves the list of rankers for the user. | 
| Ranker | getRankerStatus(String rankerID)Retrieves the status of a ranker. | 
| SolrCluster | getSolrCluster(String solrClusterId)Returns a Solr cluster information. | 
| InputStream | getSolrClusterConfiguration(String solrClusterId,
                           String configName)Gets the configuration from ZooKeeper. | 
| List<String> | getSolrClusterConfigurations(String solrClusterId)Lists the configuration sets in ZooKeeper. | 
| SolrClusterList | getSolrClusters()Lists all Solr clusters currently associated with the service instance. | 
| String | getSolrUrl(String solrClusterId)This URL can be used with the SolrJ library to access Solr functionality. | 
| Ranking | rank(String rankerID,
    File answers,
    Integer topAnswers)Gets and returns the ranked answers. | 
| void | uploadSolrClusterConfigurationDirectory(String solrClusterId,
                                       String configName,
                                       File directory)Uploads a configuration  Fileto ZooKeeper's namespace, including schema.xml,
 solrconfig.xml, and all other necessary config files to configure a SolrCloud collection. | 
| void | uploadSolrClusterConfigurationZip(String solrClusterId,
                                 String configName,
                                 File zippedConfig)Uploads a configuration ZIP  Fileto ZooKeeper's namespace, including schema.xml,
 solrconfig.xml, and all other necessary config files to configure a SolrCloud collection. | 
configureHttpClient, execute, executeRequest, executeWithoutResponse, getApiKey, getEndPoint, getName, getToken, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setUsernameAndPassword, toStringpublic 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 SolrCluster createSolrCluster()
ClusterLifecycleManagercreateSolrCluster in interface ClusterLifecycleManagerpublic SolrCluster createSolrCluster(SolrClusterOptions config)
ClusterLifecycleManagercreateSolrCluster in interface ClusterLifecycleManagerconfig - the solr cluster configurationpublic void deleteRanker(String rankerID)
rankerID - the ranker idpublic void deleteSolrCluster(String solrClusterId)
ClusterLifecycleManagerSolrCluster. deleteSolrCluster in interface ClusterLifecycleManagersolrClusterId - the Solr cluster idpublic void deleteSolrClusterConfiguration(String solrClusterId, String configName)
SolrConfigManagerdeleteSolrClusterConfiguration in interface SolrConfigManagersolrClusterId - the solr cluster idconfigName - the name of the configuration in ZooKeeper.public Rankers getRankers()
public Ranker getRankerStatus(String rankerID)
rankerID - the ranker IDRankerpublic SolrCluster getSolrCluster(String solrClusterId)
ClusterLifecycleManagergetSolrCluster in interface ClusterLifecycleManagersolrClusterId - the Solr cluster idpublic InputStream getSolrClusterConfiguration(String solrClusterId, String configName)
SolrConfigManagergetSolrClusterConfiguration in interface SolrConfigManagersolrClusterId - the solr cluster idconfigName - the name of the configuration in ZooKeeperpublic List<String> getSolrClusterConfigurations(String solrClusterId)
SolrConfigManagergetSolrClusterConfigurations in interface SolrConfigManagersolrClusterId - the solr cluster idpublic SolrClusterList getSolrClusters()
ClusterLifecycleManagergetSolrClusters in interface ClusterLifecycleManagerpublic String getSolrUrl(String solrClusterId)
solrClusterId - the ID of the Solr cluster to connect topublic 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 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 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.Copyright © 2015–2016. All rights reserved.