summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-06-11 13:47:27 +0200
committerPeter Wu <peter@lekensteyn.nl>2014-06-11 13:47:27 +0200
commit7b36e82bb8c521353bfa19ce4b3534bcd41fcb38 (patch)
treed53fa8ca6d2369698eef9b7e6c63e17de4b7097c
parent761c4164faac35fc34ade62ca7654573f2c07835 (diff)
downloadGoldfarmer-7b36e82bb8c521353bfa19ce4b3534bcd41fcb38.tar.gz
Limit updating to unclassified tweets
Tweets which do not mention a brand at all will have a brand "no".
-rw-r--r--src/main/Analyzor.java5
1 files changed, 4 insertions, 1 deletions
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