From 7b36e82bb8c521353bfa19ce4b3534bcd41fcb38 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Wed, 11 Jun 2014 13:47:27 +0200 Subject: Limit updating to unclassified tweets Tweets which do not mention a brand at all will have a brand "no". --- src/main/Analyzor.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/Analyzor.java b/src/main/Analyzor.java index b2aad4d..6e6ca67 100644 --- a/src/main/Analyzor.java +++ b/src/main/Analyzor.java @@ -292,7 +292,10 @@ public class Analyzor { System.out.println("Obtaining all selected entries in tweet."); if (queryText.isEmpty()) { - queryText = "SELECT tweetid, text FROM tweet"; + // select all tweets which are not yet classified + queryText = "SELECT tweetid, text FROM tweet t WHERE NOT EXISTS" + + " (SELECT 1 FROM mentionsbrand b WHERE b.tweetid=t.tweetid)"; + } // print expected count, this will increase the initial startup time -- cgit v1.2.1