Skip to content

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

removed hightlighting of search results within collections in GSA interface

Michael Peter Christen2e7219f9fda4
diff --git a/htroot/gsa/searchresult.java b/htroot/gsa/searchresult.java
index 2cda84577..328f58a7b 100644
--- a/htroot/gsa/searchresult.java
+++ b/htroot/gsa/searchresult.java
@@ -108,9 +108,15 @@ public class searchresult {
//post.put(, post.remove("output"));//required, example: xml,xml_no_dtd
String q = post.get(CommonParams.Q, "");
post.put("originalQuery", q);
+
+ // get a solr query string
+ Collection<String>[] cq = QueryParams.cleanQuery(q);
+ q = QueryParams.solrQueryString(cq[0], cq[1], sb.index.fulltext().getSolrScheme()).toString();
+
post.put(CommonParams.ROWS, post.remove("num"));
post.put(CommonParams.ROWS, Math.min(post.getInt(CommonParams.ROWS, 10), (authenticated) ? 5000 : 100));
post.put("hl", "true");
+ post.put("hl.q", q);
post.put("hl.fl", YaCySchema.h1_txt.getSolrFieldName() + "," + YaCySchema.h2_txt.getSolrFieldName() + "," + YaCySchema.text_t.getSolrFieldName());
post.put("hl.alternateField", YaCySchema.description.getSolrFieldName());
post.put("hl.simple.pre", "<b>");
@@ -127,10 +133,6 @@ public class searchresult {
String access = post.remove("access");
String entqr = post.remove("entqr");
- // get a solr query string
- Collection<String>[] cq = QueryParams.cleanQuery(q);
- q = QueryParams.solrQueryString(cq[0], cq[1], sb.index.fulltext().getSolrScheme()).toString();
-
// add sites operator
if (site != null && site.length() > 0) {
String[] s0 = site.split(Pattern.quote("|"));
diff --git a/htroot/solr/select.java b/htroot/solr/select.java
index 494150345..e2f2a1f7e 100644
--- a/htroot/solr/select.java
+++ b/htroot/solr/select.java
@@ -32,6 +32,7 @@ import net.yacy.cora.federate.solr.SolrServlet;
import net.yacy.cora.federate.solr.YaCySchema;
import net.yacy.cora.federate.solr.connector.EmbeddedSolrConnector;
import net.yacy.cora.federate.solr.responsewriter.EnhancedXMLResponseWriter;
+import net.yacy.cora.federate.solr.responsewriter.GSAResponseWriter;
import net.yacy.cora.federate.solr.responsewriter.JsonResponseWriter;
import net.yacy.cora.federate.solr.responsewriter.OpensearchResponseWriter;
import net.yacy.cora.protocol.HeaderFramework;
@@ -81,6 +82,7 @@ public class select {
RESPONSE_WRITER.put("rss", opensearchResponseWriter); //try http://localhost:8090/solr/select?wt=rss&q=olympia&hl=true&hl.fl=text_t,h1,h2
RESPONSE_WRITER.put("opensearch", opensearchResponseWriter); //try http://localhost:8090/solr/select?wt=rss&q=olympia&hl=true&hl.fl=text_t,h1,h2
RESPONSE_WRITER.put("yjson", new JsonResponseWriter()); //try http://localhost:8090/solr/select?wt=json&q=olympia&hl=true&hl.fl=text_t,h1,h2
+ RESPONSE_WRITER.put("gsa", new GSAResponseWriter());
}
/**