Closed remkohdev closed 7 years ago
Sorry to hear you are having problems with this.
I just pushed a PR that (I think) fixes this. If you could try that branch (#475) and let me know if it fixes your issue that would be great.
@remkohdev can you test if the changes now in master
fix your issue ?
When using the Java SDK for the Alchemy Data News https://github.com/watson-developer-cloud/java-sdk
on Liberty Localhost http://localhost:9080/JavaCloudantDBApp/api/watson/news?startdate=2016-10-01&enddate=2016-10-30&searchterm=elections&count=5
All goes well except I get a parse error on date [ERROR ] Error parsing: 1477799489 Unparseable date: "1477799489" [ERROR ] Error parsing: 1477798314 Unparseable date: "1477798314" [ERROR ] Error parsing: 1477797798 Unparseable date: "1477797798" [ERROR ] Error parsing: 1477797337 Unparseable date: "1477797337" [ERROR ] Error parsing: 1477796981 Unparseable date: "1477796981"
This error is thrown in the console in the DocumentsResult result = service.getNewsDocuments(params).execute(); line
when I change count to 5 to 10 the errors increase equal to count, so coming from the result json.
[{"docs":"{\n \"docs\": [\n {\n \"id\": \"MzUxODg3Mzk1NHwxNDc3Nzk5NDg5\",\n \"source\": {\n \"enriched\": {\n \"url\": {\n \"author\": \"\",\n \"enrichedTitle\": {\n \"entities\": [\n {\n \"count\": 1,\n \"disambiguated\": {},\n \"knowledgeGraph\": {},\n \"quotations\": [],\n \"relevance\": 0.00999999978,\n \"sentiment\": {\n \"mixed\": \"0\",\n \"score\": 0.0,\n \"type\": \"neutral\"\n },\n \"text\": \"80%\",\n \"type\": \"Quantity\"\n }\n ],\n \"docSentiment\": {\n \"mixed\": \"0\",\n \"score\": 0.0,\n \"type\": \"neutral\"\n }\n },\n \"publicationDate\": {\n \"confident\": false,\n \"date\": \"2016-10-30T00:00:00.000\"\n },\n \"title\": \"With 80% of Ballots Counted Independence Party Leads Icelandic Elections - USweekly\",\n \"url\": \"http://usweekly.com/news/390/67814/With_80_of_Ballots_Counted_Independence_Party_Leads_Icelandic_Elections.html\"\n }\n }\n }\n },\n {\n \"id\": \"MzUxNjIxMTcxNnwxNDc3Nzk4MzE0\",\n \"source\": {\n \"enriched\": {\n \"url\": {\n \"author\": \"Blasting News\",\n \"enrichedTitle\": {\n \"entities\": [\n {\n \"count\": 1,\n \"disambiguated\": {\n \"dbpedia\": \"http://dbpedia.org/resource/FBi_Radio\",\n \"geo\": \"\",\n \"name\": \"FBi Radio\",\n \"subType\": [\n \"Broadcast\",\n \"RadioStation\"\n ],\n \"website\": \"http://www.fbiradio.com/\"\n },\n \"knowledgeGraph\": {\n \"typeHierarchy\": \"/organizations/agencies/fbi\"\n },\n \"quotations\": [],\n \"relevance\": 0.330000013,\n \"sentiment\": {\n \"mixed\": \"0\",\n \"score\": 0.0,\n \"type\": \"neutral\"\n },\n \"text\": \"FBI\",\n \"type\": \"Organization\"\n },\n {\n \"count\": 1,\n \"disambiguated\": {},\n \"knowledgeGraph\": {\n \"typeHierarchy\": \"/people/democrats/hillary\"\n },\n \"quotations\": [],\n \"relevance\": 0.330000013,\n \"sentiment\": {\n \"mixed\": \"0\",\n \"score\": 0.0,\n \"type\": \"neutral\"\n },\n \"text\": \"Hillary\",\n \"type\": \"Person\"\n },\n {\n \"count\": 1,\n \"disambiguated\": {},\n \"knowledgeGraph\": {},\n \"quotations\": [],\n \"relevance\": 0.330000013,\n \"sentiment\": {\n \"mixed\": \"0\",\n \"score\": 0.391602993,\n \"type\": \"positive\"\n },\n \"text\": \"Trump\",\n \"type\": \"Company\"\n }\n ],\n \"docSentiment\": {\n \"mixed\": \"0\",\n \"score\": 0.374644995,\n \"type\": \"positive\"\n }\n },\n \"publicationDate\": {\n \"confident\": false,\n \"date\": \"2016-10-30T00:00:00.000\"\n },\n \"title\": \"New FBI Investigation on Hillary’s ‘lost emails’ can put elections in Trump’s favour\",\n \"url\": \"http://uk.blastingnews.com/politics/2016/10/new-fbi-investigation-on-hillary-s-lost-emails-can-put-elections-in-trump-s-favour-001219069.html\"\n }\n }\n }\n },\n {\n \"id\": \"MzUwMzk4OTc3NXwxNDc3Nzk3Nzk4\",\n \"source\": {\n \"enriched\": {\n \"url\": {\n \"author\": \"\",\n \"enrichedTitle\": {\n \"entities\": [],\n \"docSentiment\": {\n \"mixed\": \"0\",\n \"score\": 0.0,\n \"type\": \"neutral\"\n }\n },\n \"publicationDate\": {\n \"confident\": false,\n \"date\": \"2016-10-28T00:00:00.000\"\n },\n \"title\": \"Nov. 8 elections update\",\n \"url\": \"http://www.reporternews.com/news/local/nov-8-elections-update-3fc6643d-399e-19a4-e053-0100007ff62b-399192141.html\"\n }\n }\n }\n },\n {\n \"id\": \"MTY5NDkxNDExMjF8MTQ3Nzc5NzMzNw\",\n \"source\": {\n \"enriched\": {\n \"url\": {\n \"author\": \"Lebanese authorities crack terror network\",\n \"enrichedTitle\": {\n \"entities\": [\n {\n \"count\": 1,\n \"disambiguated\": {},\n \"knowledgeGraph\": {\n \"typeHierarchy\": \"/organizations/agencies/council/fifa council\"\n },\n \"quotations\": [],\n \"relevance\": 0.330000013,\n \"sentiment\": {\n \"mixed\": \"0\",\n \"score\": 0.0,\n \"type\": \"neutral\"\n },\n \"text\": \"FIFA council\",\n \"type\": \"Organization\"\n }\n ],\n \"docSentiment\": {\n \"mixed\": \"0\",\n \"score\": 0.0,\n \"type\": \"neutral\"\n }\n },\n \"publicationDate\": {\n \"confident\": false,\n \"date\": \"2016-10-30T00:00:00.000\"\n },\n \"title\": \"Soccer-Asian elections for FIFA council to be held in February | Zawya\",\n \"url\": \"http://www.zawya.com/mena/en/story/Asian_elections_for_FIFA_council_to_be_held_in_February-TR20161029nL4N1CZ05BX2/\"\n }\n }\n }\n },\n {\n \"id\": \"MzUwODkyNTkyNnwxNDc3Nzk2OTgx\",\n \"source\": {\n \"enriched\": {\n \"url\": {\n \"author\": \"Post Publishing PCL.\",\n \"enrichedTitle\": {\n \"entities\": [\n {\n \"count\": 1,\n \"disambiguated\": {\n \"dbpedia\": \"http://dbpedia.org/resource/United_States\",\n \"geo\": \"\",\n \"name\": \"United States\",\n \"subType\": [\n \"Location\",\n \"Region\",\n \"AdministrativeDivision\",\n \"GovernmentalJurisdiction\",\n \"FilmEditor\"\n ],\n \"website\": \"http://www.usa.gov/\"\n },\n \"knowledgeGraph\": {\n \"typeHierarchy\": \"/people/us\"\n },\n \"quotations\": [],\n \"relevance\": 0.330000013,\n \"sentiment\": {\n \"mixed\": \"0\",\n \"score\": -0.604476988,\n \"type\": \"negative\"\n },\n \"text\": \"US\",\n \"type\": \"Country\"\n }\n ],\n \"docSentiment\": {\n \"mixed\": \"0\",\n \"score\": -0.612100005,\n \"type\": \"negative\"\n }\n },\n \"publicationDate\": {\n \"confident\": false,\n \"date\": \"2016-10-30T09:45:00.000\"\n },\n \"title\": \"Elections or not, US Fed likely to stand pat on rates\",\n \"url\": \"http://www.bangkokpost.com/news/world/1122785/elections-or-not-us-fed-likely-to-stand-pat-on-rates\"\n }\n }\n }\n }\n ],\n \"next\": \"Blablablabla\"\n}","startdate":"2016-10-01","enddate":"2016-10-30","searchterm":"elections","count":"5"}]