2016-05-14 44 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」,以檢查所有的標點符號即「;」,「」被正確地放置並按照規定的模式,並嘗試重新上傳