From 5c7ddc67feb204af4d2aa6397423375ae7550d54 Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 6 Jun 2013 13:36:58 +0200 Subject: [PATCH] in GSA api enable usage of solr fq-attribute together with GSA site-attribute --- htroot/gsa/searchresult.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htroot/gsa/searchresult.java b/htroot/gsa/searchresult.java index b1439a256..c106c7ef8 100644 --- a/htroot/gsa/searchresult.java +++ b/htroot/gsa/searchresult.java @@ -155,7 +155,10 @@ public class searchresult { // add sites operator String[] site = post.remove("site"); // example: col1|col2 if (site != null && site[0].length() > 0) { - post.put(CommonParams.FQ, QueryModifier.parseCollectionExpression(site[0])); + String origfq = post.get(CommonParams.FQ); + String sitefq = QueryModifier.parseCollectionExpression(site[0]); + post.put(CommonParams.FQ, origfq == null || origfq.length() == 0 ? sitefq : + "(" + origfq + ") AND (" + sitefq + ")"); } // get the embedded connector