Skip to content

Commit

Permalink
Update Retrieve example to create a free client
Browse files Browse the repository at this point in the history
  • Loading branch information
gjs29 committed Sep 22, 2015
1 parent 622909d commit 5908fb7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/retrieve_and_rank_lifecycle.v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ var retrieve = watson.retrieve_and_rank({

var clusterId;

// Label to identify your cluster in responses.
var clusterName = 'example_cluster';

// The empty string will create a free cluster. Input an integer to create a cluster of that many units.
var clusterSize = '';

async.series([

function createCluster(done) {
retrieve.createCluster({cluster_name: 'example_cluster', cluster_size: '1'}, function getId(err, res) {
retrieve.createCluster({cluster_name: clusterName, cluster_size: clusterSize}, function getId(err, res) {
if (err) {
return console.log('Error creating Solr cluster: ' + JSON.stringify(err));
}
Expand Down

0 comments on commit 5908fb7

Please sign in to comment.