watson 发现查询 -- 结果集不符合预期

问题描述 投票:0回答:1

我想查询发现服务“新闻收集”,我正在使用此查询命令。

discovery.query({ environment_id: ‘my env id’,
              collection_id: ‘my coll id’,
              “count”: 10,
              “return”: “title,enrichedTitle.text”,
              “query”: “dieter zetsche”,
              “aggregations”: [ “term(docSentiment.type:2)“]
            },  function(err, response) { …

我期待以下响应结构

{
    “matching_results”: 7607,
    “aggregations”: [
       {...}
    ],
    “passages”: [],
    “results”: [
       {...}
    ]
}

但我只得到没有“聚合”的回复——有什么建议吗??? 像这样

{"matching_results":7603,
   "results":[
      {"id":".... 
ibm-watson watson-discovery
1个回答
0
投票

请注意,情感分析的 JSON 对象名称已从 docSentiment 更改sentiment

更多详细信息请参见:https://www.ibm.com/watson/developercloud/doc/discovery/migrate-nlu.html#overview-of-major-changes

© www.soinside.com 2019 - 2024. All rights reserved.