Thank you for the reply! I'm using Tomcat 6.0.20. I read the page. I think you meant setting URIEncoding for the connector: <Connector ... URIEncoding="UTF-8"/>
I tried this but it still doesn't work, while the Python client still works fine. Because the Python client works fine, I tend to think that solrj is not encoding the URL properly, as opposed to Tomcat not decoding it correctly. Is there anything I should do to make solrj do the right thing? Meanwhile, I'd like to try using POST, but I didn't find information about how to do this. Could someone point me to a link to some sample code? On Mon, Jun 7, 2010 at 11:42 AM, Tim Gilbert <tim.gilb...@morningstar.com> wrote: > I had the same problem a while back. You didn't mention which > application server you are using (if any) but some application servers > have problems with UTF-8 queries and GET. > > Tomcat has a well documented solution > http://wiki.apache.org/solr/SolrTomcat (near the bottom), I recently > experienced problems with glassfish and switched to post to solve it > (http://wiki.apache.org/solr/SolrGlassfish) > > Tim > > -----Original Message----- > From: jlist9 [mailto:jli...@gmail.com] > Sent: Monday, June 07, 2010 2:33 PM > To: solr-user@lucene.apache.org > Cc: dioxide.softw...@gmail.com > Subject: solrj Unicode queries don't return results > > Hi, I'm having a problem with Unicode queries using solrj. > I have an index with unicode strings. From /solr/admin web interface, > I can find results using the Java unicode format, such as \u751f\u6d3b. > (If I just type in a UTF-8 string, I can't find any result though. Not > sure why.) > > But in solrj, I tried having the string in UTF-8 in UTF-8 encoded Java > source > file, and I also tried using the Java unicode format in query.setQuery( > ), > but none of these approaches return any results. > > When I searched online, I found a similar question here w/o no answers. > http://www.mail-archive.com/solr-user@lucene.apache.org/msg21380.html > > So what's the right way of doing unicode queries with solrj? > > Thank you, > Jack >