HomeSvetainės medisMail usSpausdinti
Atviro kodo sprendimai
SOLR utf8 non-latin search
2012 10 12 11:11:27

Recently we've been working on one project with Solr and Solarium. Strangely, content was indexed and fetched back with correct UTF8 characters, but somewhy search didn't work with UTF8. It appeared that problem is unrelated nor Solr neither Solarium. If You are using tomcat, open Your server.xml (usually /etc/tomcat6/server.xml), find a connector You are using for HTTP server, and add following option:

URIEncoding="UTF-8"

 

I.E. after modification Your connector should look like this:

 

<Connector port="8080" protocol="HTTP/1.1".
               connectionTimeout="20000".
               redirectPort="8443"
               URIEncoding="UTF-8"  />

Also make sure there is no setting "useBodyEncodingForURI" in connector.

Reload tomcat.

Voilla! it is working!

 

(c) 2025 Atviro kodo sprendimai