Hi,
I have some problems related to URL encoding.
I'm using Solr 3.6.1 on a Windows (32 bit) system.
Apache Tomcat is version 6.0.36.
I'm accessing Solr through solrj-3.3.0.
When using the Solr admin and specifying my request, the URL looks like
this (${SOLR} is there for the sake of brevity) :
${SOLR}/select?q=rapporteur_name%3A%28John+%2BSmith+%2B%5C%28FOO%5C%29%29
But when my app launching the query, the URL looks like this :
${SOLR}/select?q=rapporteur_name%3A%28John%5C+Smith%5C+%5C%28FOO%5C%29%29
My "decoded" query, as entered in the admin interface, is :
rapporteur_name:(John +Smith +\(FOO\))
Both request return results, but only the one returns the correct ones.
The code that escapes the query is :
SolrQuery query = new SolrQuery();
query.setQuery("rapporteur_name:(" + ClientUtils.escapeQueryChars("John
Smith (FOO)") + ")");
I don't know if it's the right way to encode the query.
Any ideas or directions ?
Regards.
--
Bruno Dusausoy
Software Engineer
YP5 Software
--
Pensez environnement : limitez l'impression de ce mail.
Please don't print this e-mail unless you really need to.