GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — added example query calls to examples/GetNewsDocumentExample.java (#227) · einsnull/java-sdk@c060ffd

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • examples/java/com/ibm/watson/developer_cloud/alchemy_data_news/v1
    • GetNewsDocumentExample.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎examples/java/com/ibm/watson/developer_cloud/alchemy_data_news/v1/GetNewsDocumentExample.java‎

Copy file name to clipboardExpand all lines: examples/java/com/ibm/watson/developer_cloud/alchemy_data_news/v1/GetNewsDocumentExample.java
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
/**
2727
* Getting 7 documents between Friday 28th August 2015 and Friday 4th September 2015 using the
2828
* {@link AlchemyDataNews} API.
29-
*
29+
*
30+
* Example from java-sdk: https://github.com/watson-developer-cloud/java-sdk
3031
*/
3132
public class GetNewsDocumentExample {
3233

@@ -44,6 +45,10 @@ public static void main(String[] args) {
4445
params.put(AlchemyDataNews.START, "1440720000");
4546
params.put(AlchemyDataNews.END, "1441407600");
4647
params.put(AlchemyDataNews.COUNT, 7);
48+
//Query on adjacent nested fields:
49+
params.put("q.enriched.url.enrichedTitle.entities.entity", "|text=IBM,type=company|");
50+
params.put("q.enriched.url.enrichedTitle.docSentiment.type", "positive");
51+
params.put("q.enriched.url.enrichedTitle.taxonomy.taxonomy_.label", "technology and computing");
4752

4853
DocumentsResult result = service.getNewsDocuments(params);
4954

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.