Post to Bluemix Retrieve_and_Rank gives status 0, but does not work
<p>I am trying to index some web pages in Bluemix Retrieve and Rank service. So I did crawled my seeds with nutch 1.11, dumped the crawled data(about 9000 URLs) as files, posted those that are possible e.g xml files to my Collection:</p>
<pre><code>Post_url = '&quot;https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/%s/solr/%s/update&quot;' %(solr_cluster_id, solr_collection_name)
cmd ='''curl -X POST -H %s -u %s %s --data-binary @%s''' %(Cont_type_xml, solr_credentials, Post_url, myfilename)
subprocess.call(cmd,shell=True)
</code></pre>
<p>and converted the rest to json with Bluemix Doc-Conv service:</p>
<pre><code>doc_conv_url = '&quot;https://gateway.watsonplatform.net/document-conversion/api/v1/convert_document?version=2015-12-15&quot;'
cmd ='''curl -X POST -u %s -F config=&quot;{\\&quot;conversion_target\\&quot;:\\&quot;answer_units\\&quot;}&quot; -F file=@%s %s''' %(doc_conv_credentials, myfilename, doc_conv_url)
process = subprocess.Popen(cmd, shell= True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
</code></pre>
<p>and then saved these Json results in a json file and posted it to my collection:</p>
<pre><code>Post_converted_url = '&quot;https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/%s/solr/%s/update/json/docs?commit=true&amp;split=/answer_units/id&amp;f=id:/answer_units/id&amp;f=title:/answer_units/title&amp;f=body:/answer_units/content/text&quot;' %(solr_cluster_id, solr_collection_name)
cmd ='''curl -X POST -H %s -u %s %s --data-binary @%s''' %(Cont_type_json, solr_credentials, Post_converted_url, Path_jsonFile)
subprocess.call(cmd,shell=True)
</code></pre>
<p>Everything sounds to be done OK. The json file is as it should be and when I post the data I do receive the Status 0, which I Thought means the posting was done correctly. But when I send Queries:</p>
<pre><code>pysolr_client = retrieve_and_rank.get_pysolr_client(solr_cluster_id, solr_collection_name)
results = pysolr_client.search(Query_term)
print(results.docs)
</code></pre>
<p>the result is nothing. It finds nothing. I have done the same before, with the same commands' structure and everything, and it worked. I just made a new collection and now it doesn't work.</p>
<p>Has my data been indexed? Then Why the query does not work?
When I try getting usage statistics for my Solr cluster the result is:</p>
<blockquote>
<p>{&quot;disk_usage&quot;:{&quot;used_bytes&quot;:2210,&quot;total_bytes&quot;:34359738368,&quot;used&quot;:&quot;2.1582 KB&quot;,&quot;total&quot;:&quot;32 GB&quot;,&quot;percent_used&quot;:6.4319465309381485E-6},</p>
<p>&quot;memory_usage&quot;:{&quot;used_bytes&quot;:2069028864,&quot;total_bytes&quot;:4194304000,&quot;used&quot;:&quot;1.9269 GB&quot;,&quot;total&quot;:&quot;3.9063 GB&quot;,&quot;percent_used&quot;:49.3294921875}}</p>
</blockquote>
<p>which I thought means my data has been indexed and is stored in my cluster.
Just now I realized that every time that I post my data the data usage and memory usage does not change. does it mean the Posting is not done? even though I receive Status 0? If yes any ideas on what the problem is? why is it happening?</p>
<p>Does it has anything to do with the solr_config?<br />
Any helps or ideas on how to get the result from a query would be highly appreciated.</p>