| Author |
Searching chinese is actually working
|
Migrated From Jforum.net
Ranch Hand
Joined: Apr 22, 2012
Posts: 17424
|
|
A few topics in the forum talked about the chinese search problem, and a simple test on my local installation showed i had the same problem. So I decided to tackle this problem. Surprisingly it turns out it's supported already!!!
My environment:
Windows XP SP2
Postgres 8.1 on local machine, UTF-8 DB creation
There're two word matching modes in jforum,"equal" and "like", "equal" means you search for a word, while "like" search for a series of characters. When generating SQL, "equals" -> = while "like"-> like
So, the cause is quite clear, you need to change the mode to "like" since default is "equal", simply add the following line to jforum-custom.conf. Or change in SystemGlobals.properties.
search.word.matching = like
In fact, if you don't change the mode, search for partial english word also doesn't return anything.
Roy
[originally posted on jforum.net by luorihui]
|
 |
Migrated From Jforum.net
Ranch Hand
Joined: Apr 22, 2012
Posts: 17424
|
|
oops, forgot to mention JForum version, it's JForum 2.1.6
Roy [originally posted on jforum.net by luorihui]
|
 |
Migrated From Jforum.net
Ranch Hand
Joined: Apr 22, 2012
Posts: 17424
|
|
That's right.
The point of "equal" being the default value is that "like" performs worst, so I leave it to the board admin.
Rafael [originally posted on jforum.net by Rafael Steil]
|
 |
Migrated From Jforum.net
Ranch Hand
Joined: Apr 22, 2012
Posts: 17424
|
|
This search trick is working excellent
Today, I just installed the 2.1.6 on a tomcat 5.5 with 5.0 mysql, chinese works.
remember to
1. CREATE DATABASE jforum CHARACTER SET utf8;
2. database.connection.string=jdbc\:mysql\://${database.connection.host}\:${database.connection.port}/${database.connection.dbname}?user\=${database.connection.username}&password\=${database.connection.password}&autoReconnect\=true&useUnicode\=true&characterEncoding\=utf8&useNewIO\=false&zeroDateTimeBehavior\=convertToNull&useServerPrepStmts\=false
in jforum-custom.conf file (remember, dont edit in mysql.properties file only, the running instance only read jforum-custom.conf based on the log output from the application that I read)
if it doesnt work, do #3
3. URIEncoding="UTF-8" useBodyEncodingForURI="true" in tomcat\conf\server.xml
Good luck to everyone who have problem with jforum in chinese. Now it is the time to try LDAP. [originally posted on jforum.net by Matthew.Kwong]
|
 |
 |
|
|
subject: Searching chinese is actually working
|
|
|