Watson Developer Cloud Unity SDK
1.0.0
The Unity SDK uses the Watson Developer Cloud services, a collection of REST APIs and SDKs that use cognitive computing to solve complex problems.
|
This class wraps the Retrieve and Rank service. Retrieve and Rank Service More...
Classes | |
class | CollectionRequest |
The ForwardCollectionRequest request More... | |
class | CreateClusterRequest |
The Create Cluster request. More... | |
class | CreateRankerRequest |
The Create Ranker request. More... | |
class | DeleteClusterConfigRequest |
The Delete Cluster Config request More... | |
class | DeleteClusterRequest |
The Delete Cluster request More... | |
class | DeleteRankerRequest |
The Delete Ranker request More... | |
class | GetClusterConfigsRequest |
The GetClusterConfigs request. More... | |
class | GetClusterRequest |
The Get Cluster request More... | |
class | GetClustersRequest |
The GetCluster request. More... | |
class | GetRankerRequest |
The Get Ranker request More... | |
class | GetRankersRequest |
The GetRanker request. More... | |
class | IndexDocumentsRequest |
The Create Ranker request. More... | |
class | RankRequest |
The Rank request. More... | |
class | SearchRequest |
The search request. More... | |
Public Member Functions | |
RetrieveAndRank (Credentials credentials) | |
delegate byte[] | LoadFileDelegate (string filename) |
The delegate for loading a file, used by TrainClassifier(). More... | |
delegate void | SaveFileDelegate (string filename, byte[] data) |
The delegate for saving a file, used by DownloadDialog(). More... | |
delegate void | OnGetClusters (SolrClusterListResponse resp, string data) |
OnGetClusters delegate. More... | |
bool | GetClusters (OnGetClusters callback, string customData=default(string)) |
Retrieves the list of Solr clusters for the service instance. More... | |
delegate void | OnCreateCluster (SolrClusterResponse resp, string data) |
OnCreateCluster callback delegate. More... | |
bool | CreateCluster (OnCreateCluster callback, string clusterName=default(string), string clusterSize=default(string), string customData=default(string)) |
Provisions a Solr cluster asynchronously. When the operation is successful, the status of the cluster is set to NOT_AVAILABLE. The status must be READY before you can use the cluster. For information about cluster sizing see http://www.ibm.com/watson/developercloud/doc/retrieve-rank/solr_ops.shtml#sizing. More... | |
delegate void | OnDeleteCluster (bool success, string data) |
Delete cluster callback delegate. More... | |
bool | DeleteCluster (OnDeleteCluster callback, string clusterID, string customData=default(string)) |
Delete a Solr cluster. More... | |
delegate void | OnGetCluster (SolrClusterResponse resp, string data) |
Get cluster info callback delegate. More... | |
bool | GetCluster (OnGetCluster callback, string clusterID, string customData=default(string)) |
Returns status and other information about a cluster. More... | |
delegate void | OnGetClusterConfigs (SolrConfigList resp, string data) |
Get Cluster Configs callback delegate. More... | |
bool | GetClusterConfigs (OnGetClusterConfigs callback, string clusterID, string customData=default(string)) |
Returns a configuration .zip file for a cluster. More... | |
delegate void | OnDeleteClusterConfig (bool success, string data) |
Delete cluster config callback delegate. More... | |
bool | DeleteClusterConfig (OnDeleteClusterConfig callback, string clusterID, string configID, string customData=default(string)) |
Deletes the configuration for a cluster. Before you delete the configuration, delete any collections that point to it. More... | |
delegate void | OnGetClusterConfig (byte[] resp, string data) |
The GetClusterConfig delegate. More... | |
bool | GetClusterConfig (OnGetClusterConfig callback, string clusterID, string configName, string customData=default(string)) |
Retrieves the configuration for a cluster by its name. More... | |
delegate void | OnSaveClusterConfig (bool success, string data) |
OnSaveClusterConfig callback delegate. More... | |
void | SaveConfig (OnSaveClusterConfig callback, byte[] configData, string configFileName, string customData) |
Saves the config zip to the file system. More... | |
delegate void | OnUploadClusterConfig (UploadResponse resp, string data) |
UploadClusterConfig callback delegate. More... | |
bool | UploadClusterConfig (OnUploadClusterConfig callback, string clusterID, string configName, string configPath, string customData=default(string)) |
Uploads a zip file containing the configuration files for your Solr collection. The zip file must include schema.xml, solrconfig.xml, and other files you need for your configuration. Configuration files on the zip file's path are not uploaded. The request fails if a configuration with the same name exists. To update an existing config, use the Solr configuration API (https://cwiki.apache.org/confluence/display/solr/Config+API). More... | |
delegate void | OnCollections (CollectionsResponse resp, string data) |
The OnGetCollections delegate. More... | |
bool | ForwardCollectionRequest (OnCollections callback, string clusterID, string action, string collectionName=default(string), string configName=default(string), string customData=default(string)) |
An example of a method that forwards to the Solr Collections API (https://cwiki.apache.org/confluence/display/solr/Collections+API). This Retrieve and Rank resource improves error handling and resiliency of the Solr Collections API. More... | |
delegate void | OnIndexDocuments (IndexResponse resp, string data) |
OnIndexDocuments callback delegate. More... | |
bool | IndexDocuments (OnIndexDocuments callback, string indexDataPath, string clusterID, string collectionName, string customData=default(string)) |
Adds content to a Solr index so you can search it. An example of a method that forwards to Solr. For more information about indexing, see Indexing and Basic Data Operations in the Apache Solr Reference (https://cwiki.apache.org/confluence/display/solr/Indexing+and+Basic+Data+Operations). You must commit your documents to the index to search for them. For more information about when to commit, see UpdateHandlers in SolrConfig in the Solr Reference (https://cwiki.apache.org/confluence/display/solr/UpdateHandlers+in+SolrConfig). More... | |
delegate void | OnSearch (SearchResponse resp, string data) |
The OnSearch callback delegate. More... | |
bool | Search (OnSearch callback, string clusterID, string collectionName, string query, string[] fl, bool isRankedSearch=false, string rankerID=default(string), string customData=default(string)) |
Return reranked results for your query. The request is similar to the Search Solr standard query parser method, but includes the ranker_id and, in the default configuration, fcselect replaces the select request handler. (https://cwiki.apache.org/confluence/display/solr/The+Standard+Query+Parser). More... | |
delegate void | OnGetRankers (ListRankersPayload resp, string data) |
OnGetRankers delegate. More... | |
bool | GetRankers (OnGetRankers callback, string customData=default(string)) |
Retrieves the list of rankers for the service instance. More... | |
delegate void | OnCreateRanker (RankerStatusPayload resp, string data) |
OnCreateCluster callback delegate. More... | |
bool | CreateRanker (OnCreateRanker callback, string trainingDataPath, string name=default(string), string customData=default(string)) |
Sends data to create and train a ranker and returns information about the new ranker. When the operation is successful, the status of the ranker is set to Training. The status must be Available before you can use the ranker. More... | |
delegate void | OnRank (RankerOutputPayload resp, string data) |
OnRank callback delegate. More... | |
bool | Rank (OnRank callback, string rankerID, string searchResultPath=default(string), string customData=default(string)) |
Returns the top answer and a list of ranked answers with their ranked scores and confidence values. Use the Get information about a ranker method to retrieve the status (http://www.ibm.com/watson/developercloud/retrieve-and-rank/api/v1/#get_status). Use this method to return answers when you train the ranker with custom features. However, in most cases, you can use the Search and rank method (http://www.ibm.com/watson/developercloud/retrieve-and-rank/api/v1/#query_ranker). More... | |
delegate void | OnDeleteRanker (bool success, string data) |
Delete Ranker callback delegate. More... | |
bool | DeleteRanker (OnDeleteRanker callback, string rankerID, string customData=default(string)) |
Deletes a ranker. More... | |
delegate void | OnGetRanker (RankerStatusPayload resp, string data) |
Get ranker info callback delegate. More... | |
bool | GetRanker (OnGetRanker callback, string rankerID, string customData=default(string)) |
Returns status and other information about a ranker. More... | |
string | GetServiceID () |
<exclude> More... | |
Properties | |
string | Url [get, set] |
Gets and sets the endpoint URL for the service. More... | |
Credentials | Credentials [get, set] |
Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined. More... | |
LoadFileDelegate | LoadFile [get, set] |
Set this property to overload the internal file loading of this class. More... | |
SaveFileDelegate | SaveFile [get, set] |
Set this property to overload the internal file saving for this class. More... | |
This class wraps the Retrieve and Rank service. Retrieve and Rank Service
|
inline |
|
inline |
Provisions a Solr cluster asynchronously. When the operation is successful, the status of the cluster is set to NOT_AVAILABLE. The status must be READY before you can use the cluster. For information about cluster sizing see http://www.ibm.com/watson/developercloud/doc/retrieve-rank/solr_ops.shtml#sizing.
callback | |
clusterName | Name to identify the cluster. |
clusterSize | Size of the cluster to create. Ranges from 1 to 7. Send an empty value to create a small free cluster for testing. You can create only one free cluster. |
customData |
|
inline |
Sends data to create and train a ranker and returns information about the new ranker. When the operation is successful, the status of the ranker is set to Training. The status must be Available before you can use the ranker.
callback | |
trainingDataPath | Training data in CSV format. The first header must be question_id and the last header must be the relevance label. The other headers are alphanumeric feature names. For details, see Using your own data (http://www.ibm.com/watson/developercloud/doc/retrieve-rank/data_format.shtml). |
name | Metadata in JSON format. The metadata identifies an optional name to identify the ranker. |
customData |
|
inline |
Delete a Solr cluster.
callback | |
clusterID | |
customData |
|
inline |
Deletes the configuration for a cluster. Before you delete the configuration, delete any collections that point to it.
callback | |
clusterID | The name of the configuration to delete. |
configID | Cluster ID for the configuration. |
customData |
|
inline |
Deletes a ranker.
callback | |
rankerID | ID of the ranker to delete. |
customData |
|
inline |
An example of a method that forwards to the Solr Collections API (https://cwiki.apache.org/confluence/display/solr/Collections+API). This Retrieve and Rank resource improves error handling and resiliency of the Solr Collections API.
callback | |
clusterID | Cluster ID for the collection. |
action | Operation to carry out. Either "CREATE", "LIST", or "DELETE" |
collectionName | The collectionName required for "CREATE" or "DELETE". |
configName | The cluster configuration name to use for "CREATE". |
customData |
|
inline |
Returns status and other information about a cluster.
callback | |
clusterID | Unique identifier for this cluster. |
customData |
|
inline |
Retrieves the configuration for a cluster by its name.
callback | |
clusterID | Cluster ID for the configuration. |
configName | The name of the configuration to retrieve. |
customData |
|
inline |
Returns a configuration .zip file for a cluster.
callback | |
clusterID | |
customData |
|
inline |
Retrieves the list of Solr clusters for the service instance.
callback | |
customData |
|
inline |
Returns status and other information about a ranker.
callback | |
rankerID | ID of the ranker to query. |
customData |
|
inline |
Retrieves the list of rankers for the service instance.
callback | |
customData |
|
inline |
<exclude>
Implements IBM.Watson.DeveloperCloud.Services.IWatsonService.
|
inline |
Adds content to a Solr index so you can search it. An example of a method that forwards to Solr. For more information about indexing, see Indexing and Basic Data Operations in the Apache Solr Reference (https://cwiki.apache.org/confluence/display/solr/Indexing+and+Basic+Data+Operations). You must commit your documents to the index to search for them. For more information about when to commit, see UpdateHandlers in SolrConfig in the Solr Reference (https://cwiki.apache.org/confluence/display/solr/UpdateHandlers+in+SolrConfig).
callback | |
indexdataPath | Path to the file that defines the content. |
clusterID | Cluster ID. |
collectionName | Collection. |
customData |
delegate byte [] IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.LoadFileDelegate | ( | string | filename | ) |
The delegate for loading a file, used by TrainClassifier().
filename | The filename to load. |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnCollections | ( | CollectionsResponse | resp, |
string | data | ||
) |
The OnGetCollections delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnCreateCluster | ( | SolrClusterResponse | resp, |
string | data | ||
) |
OnCreateCluster callback delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnCreateRanker | ( | RankerStatusPayload | resp, |
string | data | ||
) |
OnCreateCluster callback delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnDeleteCluster | ( | bool | success, |
string | data | ||
) |
Delete cluster callback delegate.
deleteSuccess | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnDeleteClusterConfig | ( | bool | success, |
string | data | ||
) |
Delete cluster config callback delegate.
deleteSuccess | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnDeleteRanker | ( | bool | success, |
string | data | ||
) |
Delete Ranker callback delegate.
deleteSuccess | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnGetCluster | ( | SolrClusterResponse | resp, |
string | data | ||
) |
Get cluster info callback delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnGetClusterConfig | ( | byte[] | resp, |
string | data | ||
) |
The GetClusterConfig delegate.
getSuccess | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnGetClusterConfigs | ( | SolrConfigList | resp, |
string | data | ||
) |
Get Cluster Configs callback delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnGetClusters | ( | SolrClusterListResponse | resp, |
string | data | ||
) |
OnGetClusters delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnGetRanker | ( | RankerStatusPayload | resp, |
string | data | ||
) |
Get ranker info callback delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnGetRankers | ( | ListRankersPayload | resp, |
string | data | ||
) |
OnGetRankers delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnIndexDocuments | ( | IndexResponse | resp, |
string | data | ||
) |
OnIndexDocuments callback delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnRank | ( | RankerOutputPayload | resp, |
string | data | ||
) |
OnRank callback delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnSaveClusterConfig | ( | bool | success, |
string | data | ||
) |
OnSaveClusterConfig callback delegate.
success | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnSearch | ( | SearchResponse | resp, |
string | data | ||
) |
The OnSearch callback delegate.
resp | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.OnUploadClusterConfig | ( | UploadResponse | resp, |
string | data | ||
) |
UploadClusterConfig callback delegate.
resp | |
data |
|
inline |
Returns the top answer and a list of ranked answers with their ranked scores and confidence values. Use the Get information about a ranker method to retrieve the status (http://www.ibm.com/watson/developercloud/retrieve-and-rank/api/v1/#get_status). Use this method to return answers when you train the ranker with custom features. However, in most cases, you can use the Search and rank method (http://www.ibm.com/watson/developercloud/retrieve-and-rank/api/v1/#query_ranker).
callback | |
rankerID | ID of the ranker to use. |
searchResultPath | The path to the CSV file that contains the search results that you want to rank. The first column header of the CSV must be labeled answer_id. The remaining column headers must match the names of the features in the training data that was used when this ranker was created. |
customData |
|
inline |
Saves the config zip to the file system.
callback | |
configData | Byte array of the config data. |
configFileName | Where to save the zip file in the file system. |
customData |
delegate void IBM.Watson.DeveloperCloud.Services.RetrieveAndRank.v1.RetrieveAndRank.SaveFileDelegate | ( | string | filename, |
byte[] | data | ||
) |
The delegate for saving a file, used by DownloadDialog().
filename | The filename to save. |
data | The data to save into the file. |
|
inline |
Return reranked results for your query. The request is similar to the Search Solr standard query parser method, but includes the ranker_id and, in the default configuration, fcselect replaces the select request handler. (https://cwiki.apache.org/confluence/display/solr/The+Standard+Query+Parser).
callback | |
clusterID | Cluster ID. |
collectionName | The name of the collection to use. |
query | The query. Uses Solr standard query syntax. |
fl | The fields to return. |
isRankedSearch | Use ranked search instead of standard search. |
rankerID | The trained ranker to query. |
customData |
|
inline |
Uploads a zip file containing the configuration files for your Solr collection. The zip file must include schema.xml, solrconfig.xml, and other files you need for your configuration. Configuration files on the zip file's path are not uploaded. The request fails if a configuration with the same name exists. To update an existing config, use the Solr configuration API (https://cwiki.apache.org/confluence/display/solr/Config+API).
callback | |
clusterID | Cluster ID for the configuration. |
configName | The name of the configuration to create. |
configPath | The path to the compressed configuration files. |
customData |
|
getset |
Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined.
|
getset |
Set this property to overload the internal file loading of this class.
|
getset |
Set this property to overload the internal file saving for this class.
|
getset |
Gets and sets the endpoint URL for the service.