Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

check content domain fix: search image/media should not show pages containing image/media search text should show all/text but image/media

sixcooler76b037a20a99
diff --git a/source/net/yacy/search/query/RWIProcess.java b/source/net/yacy/search/query/RWIProcess.java
index 93e975e9e..98e0a8e1d 100644
--- a/source/net/yacy/search/query/RWIProcess.java
+++ b/source/net/yacy/search/query/RWIProcess.java
@@ -320,7 +320,7 @@ public final class RWIProcess extends Thread
}
// check document domain
- if ( this.query.contentdom != Classification.ContentDomain.ALL ) {
+ if ( this.query.contentdom.getCode() > 0 ) {
if ( (this.query.contentdom == ContentDomain.AUDIO)
&& (!(iEntry.flags().get(Condenser.flag_cat_hasaudio))) ) {
continue pollloop;
@@ -659,9 +659,10 @@ public final class RWIProcess extends Thread
}
// check content domain
- if (this.query.contentdom != Classification.ContentDomain.ALL &&
- page.url().getContentDomain() != Classification.ContentDomain.ALL &&
- page.url().getContentDomain() != this.query.contentdom) {
+ if ((this.query.contentdom.getCode() > 0 &&
+ page.url().getContentDomain() != this.query.contentdom) ||
+ (this.query.contentdom == Classification.ContentDomain.TEXT &&
+ page.url().getContentDomain().getCode() > 0)) {
this.sortout++;
continue;
}