diff --git a/source/net/yacy/peers/Protocol.java b/source/net/yacy/peers/Protocol.java index 88b3ddf5f..0eeb23863 100644 --- a/source/net/yacy/peers/Protocol.java +++ b/source/net/yacy/peers/Protocol.java @@ -62,6 +62,7 @@ import java.util.concurrent.atomic.AtomicInteger; import net.yacy.migration; import net.yacy.cora.date.GenericFormatter; import net.yacy.cora.document.analysis.Classification; +import net.yacy.cora.document.analysis.Classification.ContentDomain; import net.yacy.cora.document.encoding.ASCII; import net.yacy.cora.document.encoding.UTF8; import net.yacy.cora.document.feed.RSSFeed; @@ -559,7 +560,7 @@ public final class Protocol { final String wordhashes, final String excludehashes, final String language, - final String contentdom, + final ContentDomain contentdom, final int count, final long time, final int maxDistance, @@ -653,7 +654,7 @@ public final class Protocol { final SearchEvent event, final String wordhashes, final String urlhashes, - final String contentdom, + final ContentDomain contentdom, final int count, final long time, final int maxDistance, @@ -848,7 +849,7 @@ public final class Protocol { final String excludehashes, final String urlhashes, final String language, - final String contentdom, + final ContentDomain contentdom, final int count, final long time, final int maxDistance, @@ -900,8 +901,9 @@ public final class Protocol { parts.put("modifier", UTF8.StringBody(event.query.modifier.toString())); parts.put("language", UTF8.StringBody(language)); parts.put("sitehash", UTF8.StringBody(event.query.modifier.sitehash)); + //parts.put("sitehost", UTF8.StringBody(event.query.modifier.sitehost)); parts.put("author", UTF8.StringBody(event.query.modifier.author)); - parts.put("contentdom", UTF8.StringBody(contentdom)); + parts.put("contentdom", UTF8.StringBody(contentdom == null ? ContentDomain.ALL.toString() : contentdom.toString())); parts.put("ttl", UTF8.StringBody("0")); parts.put("maxdist", UTF8.StringBody(Integer.toString(maxDistance))); parts.put("profile", UTF8.StringBody(crypt.simpleEncode(event.query.ranking.toExternalString()))); diff --git a/source/net/yacy/peers/RemoteSearch.java b/source/net/yacy/peers/RemoteSearch.java index 728b4a5af..fd4017a74 100644 --- a/source/net/yacy/peers/RemoteSearch.java +++ b/source/net/yacy/peers/RemoteSearch.java @@ -34,6 +34,7 @@ import java.util.SortedMap; import org.apache.solr.client.solrj.SolrQuery; +import net.yacy.cora.document.analysis.Classification.ContentDomain; import net.yacy.cora.document.encoding.ASCII; import net.yacy.cora.storage.HandleSet; import net.yacy.cora.util.ConcurrentLog; @@ -53,7 +54,8 @@ public class RemoteSearch extends Thread { public static final ConcurrentLog log = new ConcurrentLog("DHT"); final private SearchEvent event; - final private String wordhashes, excludehashes, contentdom; + final private String wordhashes, excludehashes; + final private ContentDomain contentdom; final private int partitions; final private SecondarySearchSuperviser secondarySearchSuperviser; final private Blacklist blacklist; @@ -68,7 +70,7 @@ public class RemoteSearch extends Thread { final String wordhashes, final String excludehashes, final String language, - final String contentdom, + final ContentDomain contentdom, final int count, final long time, final int maxDistance, @@ -228,7 +230,7 @@ public class RemoteSearch extends Thread { QueryParams.hashSet2hashString(event.query.getQueryGoal().getIncludeHashes()), QueryParams.hashSet2hashString(event.query.getQueryGoal().getExcludeHashes()), event.query.targetlang == null ? "" : event.query.targetlang, - event.query.contentdom == null ? "all" : event.query.contentdom.toString(), + event.query.contentdom == null ? ContentDomain.ALL : event.query.contentdom, count, time, event.query.maxDistance, @@ -273,7 +275,7 @@ public class RemoteSearch extends Thread { event, QueryParams.hashSet2hashString(wordhashes), urlhashes, - "all", + ContentDomain.ALL, 20, time, 999,