Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
/**
* Getting 7 documents between Friday 28th August 2015 and Friday 4th September 2015 using the
* {@link AlchemyDataNews} API.
*
*
* Example from java-sdk: https://github.com/watson-developer-cloud/java-sdk
*/
public class GetNewsDocumentExample {

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

DocumentsResult result = service.getNewsDocuments(params);

Expand Down