From 565171313419174fe99ac7a39067e9e656223acc Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Tue, 7 Apr 2015 17:02:02 +0200 Subject: [PATCH] better debugging of fq --- .../federate/solr/connector/EmbeddedSolrConnector.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnector.java b/source/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnector.java index 6f3c9f990..963387595 100644 --- a/source/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnector.java +++ b/source/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnector.java @@ -331,9 +331,14 @@ public class EmbeddedSolrConnector extends SolrServerConnector implements SolrCo if (this.server == null) throw new IOException("server disconnected"); // during the solr query we set the thread name to the query string to get more debugging info in thread dumps String q = params.get(CommonParams.Q); - String fq = params.get(CommonParams.FQ); + String[] fq = params.getParams(CommonParams.FQ); String threadname = Thread.currentThread().getName(); - if (q != null) Thread.currentThread().setName("solr query: q = " + q + (fq == null ? "" : ", fq = " + fq)); + if (q != null) { + StringBuilder fqa = new StringBuilder(); + for (String f: fq) fqa.append("fq=").append(f).append(' '); + Thread.currentThread().setName("solr query: q = " + q + (fq == null ? "" : ", " + fqa.toString())); + //System.out.println("solr query: q = " + q + (fq == null ? "" : ", " + fqa.toString())); + } QueryResponse rsp; try { rsp = this.server.query(params);