add language navigation filter clause to rwi results

pull/1/head
reger 11 years ago
parent f307d65dcf
commit 9b24dae2b7

@ -103,7 +103,6 @@ public class Segment {
public static final int lowcachedivisor = 900;
public static final long targetFileSize = 64 * 1024 * 1024; // 256 MB
public static final int writeBufferSize = 4 * 1024 * 1024;
public static final String UrlDbName = "text.urlmd";
public static final String termIndexName = "text.index";
public static final String citationIndexName = "citation.index";

@ -1078,6 +1078,14 @@ public final class SearchEvent {
continue;
}
// check modifier constraint (language)
// TODO: : page.language() never null but defaults to "en" (may cause false drop of result)
if (this.query.modifier.language != null && !this.query.modifier.language.equals(ASCII.String(page.language()))) {
if (log.isFine()) log.fine("dropped RWI: language constraint = " + this.query.modifier.language);
if (page.word().local()) this.local_rwi_available.decrementAndGet(); else this.remote_rwi_available.decrementAndGet();
continue;
}
// Check for blacklist
if (Switchboard.urlBlacklist.isListed(BlacklistType.SEARCH, page.url())) {
if (log.isFine()) log.fine("dropped RWI: url is blacklisted in url blacklist");

Loading…
Cancel
Save