Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

in GSA api enable usage of solr fq-attribute together with GSA site-attribute

orbiter5c7ddc67feb2
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