diff --git a/source/net/yacy/cora/document/Classification.java b/source/net/yacy/cora/document/Classification.java index 7afbf7272..fbf326236 100644 --- a/source/net/yacy/cora/document/Classification.java +++ b/source/net/yacy/cora/document/Classification.java @@ -135,12 +135,12 @@ public class Classification { return appsExtSet.contains(appsExt.trim().toLowerCase()); } - public static boolean isControlExtension(final String ctrlExt) { + private static boolean isControlExtension(final String ctrlExt) { if (ctrlExt == null) return false; return ctrlExtSet.contains(ctrlExt.trim().toLowerCase()); } - public static ContentDomain getContentDomain(final String ext) { + protected static ContentDomain getContentDomain(final String ext) { if (isTextExtension(ext)) return ContentDomain.TEXT; if (isImageExtension(ext)) return ContentDomain.IMAGE; if (isAudioExtension(ext)) return ContentDomain.AUDIO; diff --git a/source/net/yacy/search/query/SearchEvent.java b/source/net/yacy/search/query/SearchEvent.java index e7985fd34..7d6d6153d 100644 --- a/source/net/yacy/search/query/SearchEvent.java +++ b/source/net/yacy/search/query/SearchEvent.java @@ -502,7 +502,14 @@ public final class SearchEvent { final boolean httpPattern = pattern.equals("http://.*"); final boolean noHttpButProtocolPattern = pattern.equals("https://.*") || pattern.equals("ftp://.*") || pattern.equals("smb://.*") || pattern.equals("file://.*"); pollloop: for (URIMetadataNode iEntry: index) { - + + if ( !this.query.urlMask_isCatchall ) { + // check url mask + if (!iEntry.matches(this.query.urlMask)) { + continue pollloop; + } + } + // doublecheck for urls if (this.rankingProcess.urlhashes.has(iEntry.hash())) { continue pollloop; @@ -770,8 +777,8 @@ public final class SearchEvent { } // check content domain - if ((this.query.contentdom.getCode() > 0 && page.url().getContentDomain() != this.query.contentdom) || - (this.query.contentdom == Classification.ContentDomain.TEXT && page.url().getContentDomain().getCode() > 0)) { + if (((this.query.contentdom.getCode() > 0 && page.url().getContentDomain() != this.query.contentdom) || + (this.query.contentdom == Classification.ContentDomain.TEXT && page.url().getContentDomain().getCode() > 0)) && this.query.urlMask_isCatchall) { this.query.misses.add(page.hash()); continue; } diff --git a/source/net/yacy/search/query/SnippetWorker.java b/source/net/yacy/search/query/SnippetWorker.java index 57d46a454..2b9b9e5e0 100644 --- a/source/net/yacy/search/query/SnippetWorker.java +++ b/source/net/yacy/search/query/SnippetWorker.java @@ -45,7 +45,7 @@ public class SnippetWorker extends Thread { private final int neededResults; private boolean shallrun; - public SnippetWorker(final SearchEvent snippetProcess, final long maxlifetime, final CacheStrategy cacheStrategy, final int neededResults) { + protected SnippetWorker(final SearchEvent snippetProcess, final long maxlifetime, final CacheStrategy cacheStrategy, final int neededResults) { this.snippetProcess = snippetProcess; this.cacheStrategy = cacheStrategy; this.lastLifeSign = System.currentTimeMillis();