From 76b037a20a9985dcd9162aa854493e50204e6ec0 Mon Sep 17 00:00:00 2001 From: sixcooler Date: Fri, 27 Jul 2012 04:11:52 +0200 Subject: [PATCH] check content domain fix: search image/media should not show pages containing image/media search text should show all/text but image/media --- source/net/yacy/search/query/RWIProcess.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; }