only put instances with a type on the graph

This commit is contained in:
Tao Bror Bojlén 2019-08-18 17:25:24 +02:00
parent 92ebdc5580
commit 34d4f58ff7
No known key found for this signature in database
GPG Key ID: C6EC7AAB905F9E6F
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ import java.util.concurrent.TimeUnit;
public class GraphBuilder {
private static final String nodeQuery = new StringBuilder().append("SELECT i.domain as id, i.domain as label")
.append(" FROM instances i INNER JOIN edges e ON i.domain = e.source_domain OR i.domain = e.target_domain")
.append(" WHERE i.user_count IS NOT NULL AND NOT i.opt_out").toString();
.append(" WHERE i.user_count IS NOT NULL AND NOT i.opt_out AND i.type IS NOT NULL").toString();
private static final String edgeQuery = new StringBuilder().append("SELECT e.source_domain AS source,")
.append(" e.target_domain AS target, e.weight AS weight FROM edges e").toString();