Class: RetrieveAndRankV1

RetrieveAndRankV1

new RetrieveAndRankV1(options)

Parameters:
Name Type Description
options Object
Source:

Methods

createCluster(params, callback)

Creates a Solr cluster.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Optional params

- cluster_name: name to use for identifying the cluster in responses
- cluster_size: size of the cluster to create
callback

The callback.

Source:

createCollection(params, callback)

Create a Solr collection.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to create the collection on
- collection_name: the name of the collection to create
- config_name: the name of the config in ZooKeeper

Optional params:

- wt: the writer type for the response, defaults to 'json'
callback

The callback.

Source:

createRanker()

Creates a ranker

Source:

createSolrClient(params)

Get a Solr client for indexing and searching documents. See https://github.com/lbdremy/solr-node-client for documentation and examples.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to delete the collection on
- collection_name: the name of the collection for indexing/searching
Source:

deleteCluster(params, callback)

Deletes a Solr cluster.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to delete
callback

The callback.

Source:

deleteCollection(params, callback)

Delete a Solr collection.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to delete the collection on
- collection_name: the name of the collection to delete

Optional params:

- wt: the writer type for the response, defaults to 'json'
callback

The callback.

Source:

deleteConfig(params, callback)

Delete a configuration set in ZooKeeper.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to delete configuration from
- config_name: the name of the config in ZooKeeper
callback

The callback.

Source:

deleteRanker()

Deletes a ranker

Source:

getClusterStats(params, callback)

Get memory and disk usage stats from a Solr cluster

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to get stats from
callback

The callback.

Source:

getConfig(params, callback)

Get a configuration set from ZooKeeper as a .zip file.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to get configuration from
- config_name: the name of the config in ZooKeeper
callback

The callback.

Source:

getResizeStatus(params, callback)

Get the status of a resize request.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to poll
callback

The callback.

Source:

listClusters(params, callback)

Lists all Solr clusters associated with the service instance.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. This request currently does not require any parameters.

callback

The callback.

Source:

listCollections(params, callback)

List all collections for a Solr cluster.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to list collections from

Optional params:

- wt: the writer type for the response, defaults to 'json'
callback

The callback.

Source:

listConfigs(params, callback)

Lists the configuration sets in ZooKeeper.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to get configuration from
callback

The callback.

Source:

listRankers()

Retrieves the list of rankers for the user

Source:

pollCluster(params, callback)

Checks whether the specified Solr cluster is ready for use.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to poll
callback

The callback.

Source:

rank(params, callback)

Returns the ranked candidates

Parameters:
Name Type Description
params Object

everything except answer_data and answers will be passed in as answer_metadata

Properties
Name Type Attributes Description
answer_data String | ReadableStream
answers Number <optional>

number of answers to return

callback function
Source:

rankerStatus()

Returns the training status of the ranker

Source:

resizeCluster(params, callback)

Change the size of the Solr cluster.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to poll
- cluster_size: the integer size to resize the cluster to
callback

The callback.

Source:

uploadConfig(params, callback)

Upload a configuration set to ZooKeeper.

Parameters:
Name Type Description
params

An Object representing the parameters for this service call. Required params:

- cluster_id: the ID of the Solr cluster to upload configuration to
- config_name: the name of the config in ZooKeeper referenced when creating a collection
- config_zip_path: the ZIP file to upload
callback

The callback.

Source: