【问题标题】:Watson API - Retrieve and Rank - Error uploading JSONWatson API - 检索和排名 - 上传 JSON 时出错
【发布时间】:2016-05-14 19:58:48
【问题描述】:

我正在关注Retrieve and Rank - Get Started 上的教程,我正在执行以下步骤:

发出以下命令将 cranfield_data.json 数据上传到 example_collection 集合。将 {username}、{password}、{solr_cluster_id} 和 {/path_to_file} 替换为您的信息:

$ 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].

【问题讨论】:

    标签: json retrieve-and-rank


    【解决方案1】:

    原来 JSON 中有字符导致其格式错误。

    【讨论】:

      【解决方案2】:

      只需验证 JSON“parsed_answers.json”,以检查所有标点符号,即“;”、“”是否正确放置并按照定义的架构,然后尝试重新上传

      【讨论】:

        猜你喜欢
        • 2016-09-10
        • 1970-01-01
        • 2018-10-30
        • 1970-01-01
        • 2017-07-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多