我们正在从 Watson Java SDK 3.8.0 迁移到最新版本 (4.2.1)。在进行迁移时,我采用了本节中给出的 Watson Discovery 代码片段 https://www.ibm.com/watson/developercloud/discovery/api/v1/?java#query-collection
Discovery discovery = new Discovery("2017-11-07");
discovery.setEndPoint("https://gateway.watsonplatform.net/discovery/api/");
discovery.setUsernameAndPassword("{username}", "{password}");
String environmentId = "{environment_id}";
String collectionId = "{collection_id}";
QueryRequest.Builder queryBuilder = new QueryRequest.Builder(environmentId, collectionId);
queryBuilder.query("{field}:{value}");
QueryResponse queryResponse = discovery.query(queryBuilder.build()).execute();
但看起来 4.2.1 jar 不包含 QueryRequest 类,我找不到它。api参考页面上给出的代码片段是否旧?