Permalink
Browse files

Add keyword constraint to rwi query result filter

To discard rwi results not matching query keyword: parameter
  • Loading branch information...
reger24 committed Jun 30, 2017
1 parent e82eaee commit ddd13b776d5d1e20a50c8fbd66a2e86951e4268b
Showing with 7 additions and 0 deletions.
  1. +7 −0 source/net/yacy/search/query/SearchEvent.java
@@ -1200,6 +1200,13 @@ public URIMetadataNode pullOneFilteredFromRWI(final boolean skipDoubleDom) {
}
}
// check modifier constraint (keyword)
if (this.query.modifier.keyword != null && !page.dc_subject().toLowerCase().contains(this.query.modifier.keyword.toLowerCase())) {
if (log.isFine()) log.fine("dropped RWI: keyword constraint = " + this.query.modifier.keyword);
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");

0 comments on commit ddd13b7

Please sign in to comment.