File tree Expand file tree Collapse file tree
examples/java/com/ibm/watson/developer_cloud/alchemy_data_news/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 */
3132public 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
You can’t perform that action at this time.
0 commit comments