From e07ef1b61086830bfaf8c21a24c8fd5cfc519739 Mon Sep 17 00:00:00 2001 From: luccioman Date: Fri, 1 Dec 2017 08:46:46 +0100 Subject: [PATCH] Apply tld query modifier on Solr host_s mandatory field. The filter has thus much more chances to be effective than when applied on the optional field host_dnc_s. --- source/net/yacy/search/query/QueryParams.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/search/query/QueryParams.java b/source/net/yacy/search/query/QueryParams.java index 548c7ef10..6185fe8a0 100644 --- a/source/net/yacy/search/query/QueryParams.java +++ b/source/net/yacy/search/query/QueryParams.java @@ -651,7 +651,8 @@ public final class QueryParams { } if (this.tld != null) { - fqs.add(CollectionSchema.host_dnc_s.getSolrFieldName() + ":\"" + this.tld + '\"'); + /* Use the host_s field which is mandatory, rather than the optional host_dnc_s field */ + fqs.add(CollectionSchema.host_s.getSolrFieldName() + ":*." + this.tld); } if (this.modifier.filetype != null) {