Experimental domain-searching feature

This commit is contained in:
vlofgren 2022-07-28 21:33:15 +02:00
parent 0acd999c54
commit 7f985c0a57

View File

@ -277,7 +277,7 @@ public class EdgeDataStoreDaoImpl implements EdgeDataStoreDao {
// this is safe, string concatenation is of integers // this is safe, string concatenation is of integers
String inStmt = urlId.stream().map(id -> Integer.toString(id.id())).collect(Collectors.joining(", ", "(", ")")); String inStmt = urlId.stream().map(id -> Integer.toString(id.id())).collect(Collectors.joining(", ", "(", ")"));
var rsp = stmt.executeQuery("SELECT DOMAIN_ID, DOMAIN_NAME FROM EC_URL_VIEW INNER JOIN DOMAIN_METADATA ON EC_URL_VIEW.DOMAIN_ID=DOMAIN_METADATA.ID WHERE QUALITY>-10 AND EC_URL_VIEW.ID IN " + inStmt + " ORDER BY (KNOWN_URLS<1000) ASC, (KNOWN_URLS<2000) ASC"); var rsp = stmt.executeQuery("SELECT DOMAIN_ID, DOMAIN_NAME FROM EC_URL_VIEW INNER JOIN DOMAIN_METADATA ON EC_URL_VIEW.DOMAIN_ID=DOMAIN_METADATA.ID WHERE KNOWN_URLS<5000 AND QUALITY>-10 AND EC_URL_VIEW.ID IN " + inStmt);
while (rsp.next()) { while (rsp.next()) {
int id = rsp.getInt(1); int id = rsp.getInt(1);
String domain = rsp.getString(2); String domain = rsp.getString(2);