I'm stumped. I've got some solrj 3.6.1 code that works fine against three of
my request handlers but not the fourth. The very odd thing is that I have no
trouble retrieving results with curl against all of the result handlers.
My solrj code sets some parameters:
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("fl","*,score");
params.set("rows","500");
params.set("qt","/"+product);
params.set("hl", "on");
params.set("hl.fl", "title snippet");
params.set("hl.fragsize",500000);
params.set("hl.simple.pre","");
params.set("hl.simple.post","");
queryString = "(" + queryString + s[s.length-1] + ")";
I have various request handlers that key off of the product value. I'll call
the one that doesn't work "myproduct".
I send the parameter string to catalina.out for debugging:
System.out.println(params.toString());
I get this:
fl=*%2Cscore&rows=500&qt=%2Fmyproduct&hl=on&hl.fl=title+snippet&hl.fragsize=500000
&hl.simple.pre=%3Cspan+class%3D%22hlt%22%3E
&hl.simple.post=%3C%2Fspan%3E&q=title%3A%28brain%29+OR+snippet%3A%28brain%29
I get no results when I let the solrj code do the search although the code
works fine with the other three products.
To convince myself that there is nothing wrong with the data I unencode the
parameter string and run this command:
curl "http://myserver/myapp/myproduct\
fl=*,score&rows=500&qt=/myproduct&hl=on&hl.fl=title+snippet&hl.fragsize=500000\
&hl.simple.pre=<span+class="hlt">&hl.simple.post=\
&q=title:brain%20OR%20snippet:brain"
It runs just fine.
How can I debug this?
Thanks very much.
--
View this message in context:
http://lucene.472066.n3.nabble.com/solrj-returning-no-results-but-curl-can-get-them-tp4183053.html
Sent from the Solr - User mailing list archive at Nabble.com.