How to execute searchAndRank method in IBM Watson Retrieve And Rank API through Java wrapper
<p>I am trying to perform a retrieveAndRank query using Java wrapper. I follow the online javadocs for Retrieve and Rank API.
The example there for SearchAndRank is:</p>

<p><a href="https://www.ibm.com/watson/developercloud/retrieve-and-rank/api/v1/#query_ranker" rel="nofollow">https://www.ibm.com/watson/developercloud/retrieve-and-rank/api/v1/#query_ranker</a></p>

<pre><code>RetrieveAndRank service = new RetrieveAndRank();
service.setUsernameAndPassword("{username}","{password}");
HttpSolrClient solrClient = new HttpSolrClient;
solrClient = getSolrClient(service.getSolrUrl("scfaaf8903_02c1_4297_84c6_76b79537d849"), "{username}","{password}");
SolrQuery query = new SolrQuery("what is the basic mechanism of the transonic aileron buzz");
QueryResponse response = solrClient.query("example_collection", query);
Ranking ranking = service.rank("B2E325-rank-67", response);
System.out.println(ranking);
</code></pre>

<p>but RetrieveAndRank class has no such rank(String rankerId, QueryResponse response) method. Just one getting a file or an InputStream as arguments (browsing IBM’s source code I see it expects CSV content not a java QueryResponse there).</p>

<p>How should I pass QueryResponse to the rank method?</p>

<p>I am using solr-solrj-5.5.2.jar and java-sdk-3.2.0-jar-with-dependencies.jar libraries</p>