2016-05-14 45 views
0

我在之后的Retrieve and Rank - Get Started教程,我在下面的步骤:沃森API - 检索和排名 - 错误上传JSON

Issue the following command to upload the cranfield_data.json data to the example_collection collection. Replace {username}, {password}, {solr_cluster_id}, and {/path_to_file} with your information:

$ curl -X POST -H "Content-Type: application/json" -u "{username}":"{password}" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/{solr_cluster_id}/solr/example_collection/update" --data-binary @{/path_to_file}/cranfield_data.json 

我高球用正确的请求用户名和密码,以及正确的CLUSTER_ID和路径JSON,但我得到了以下错误:

$ curl -X POST -H "Content-Type: application/json" -u "username":"password" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/cluster_id/solr/example_collection/update" --data-binary @forum_data/parsed_answers.json 

Error: WRRCSH006: Error forwarding request [/solr/example_collection/update] for Solr cluster [sc5b47c5e3_bab3_4aff_a818_f0d786d6dece]. 

回答

0

原来有在JSON字符导致它是畸形的。

0

只需验证JSON“parsed_answers.json”,以检查所有的标点符号即“;”,“”被正确地放置并按照规定的模式,并尝试重新上传