I'm trying out IBM Watson's Retrieve and Rank service and I want to try to replicate the demo (Cranfield data) using Java. I am not familiar with Apache Solr, so I just used the [cranfield-solr-config.zip] file used in the demo
http://www.ibm.com/watson/developercloud/retrieve-and-rank/api/v1/#upload_config
The cURL command works fine:
curl -X POST -H "Content-Type: application/zip" -u "{username}":"{password}" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/{SOLR_CLUSTER_ID}/config/cranfield_config" --data-binary @cranfield-solr-config.zip
In Java, I'm able to create a Solr cluster and also a Collection but I am unable to get the uploadSolrClusterConfiguration codes to work. I tried both zip and directory and nothing happens.
retrieveAndRankService.uploadSolrClusterConfigurationZip(SOLR_CLUSTER_ID, CONFIG_NAME, new File(CONFIG_ZIP));
retrieveAndRankService.uploadSolrClusterConfigurationDirectory(SOLR_CLUSTER_ID, CONFIG_NAME, new File(CONFIG_DIRECTORY)).execute();
Get SolrConfig works fine with the config uploaded by the cURL command, but returns empty for the config entered using Java
List<String> configs = retrieveAndRankService.getSolrClusterConfigurations(SOLR_CLUSTER_ID).execute().getSolrConfigs();
Am I missing a step somewhere?