From abaaaef5f1c5282b6c6912c82887c56221988526 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Sat, 11 Apr 2015 12:30:29 +0200 Subject: [PATCH] fix for filter queries --- source/net/yacy/search/query/QueryParams.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/search/query/QueryParams.java b/source/net/yacy/search/query/QueryParams.java index 6bba26e4a..d99d524b9 100644 --- a/source/net/yacy/search/query/QueryParams.java +++ b/source/net/yacy/search/query/QueryParams.java @@ -389,8 +389,11 @@ public final class QueryParams { bq += CollectionSchema.text_t.getSolrFieldName() + ":\"" + this.queryGoal.getIncludeString() + "\"^10"; } if (fq.length() > 0) { - String oldfq = params.get(CommonParams.FQ); - params.setParam(CommonParams.FQ, oldfq == null || oldfq.length() == 0 ? fq : "(" + oldfq + ") AND (" + fq + ")"); + String[] oldfq = params.getFilterQueries(); + ArrayList newfq = new ArrayList<>(oldfq.length + 1); + for (String x: oldfq) newfq.add(x); + newfq.add(fq); + params.setFilterQueries(newfq.toArray(new String[newfq.size()])); } if (bq.length() > 0) params.setParam(DisMaxParams.BQ, bq); if (bf.length() > 0) params.setParam("boost", bf); // a boost function extension, see http://wiki.apache.org/solr/ExtendedDisMax#bf_.28Boost_Function.2C_additive.29