會員註冊 / 登入  |  電腦版  |  Jump to bottom of page

User Forum » Search - impossible to accomplish across several languages?

發表人: cloph
10 年 前
Hi *,

I created a sample search-test post in the testing category. Unfortunately this forum, just as my setup doesn't return results when searching for "Übergrößenträger" - when you only search for a partial word "Übergröß" - then it matches. It also matches, when you set search options to "at least one word matches". So the problem apparently lies in tokenizing the word, as the search results in that case only highlight "Übergrößenträger" (so "entr" and "ger" are apparently not matched.

I don't know whether the problem is with lucene or jforum itself, so any pointers appreciated.

發表人: andowson
10 年 前
I just checked the ${JFORUM_HOME}/WEB-INF/config/SystemGlobals.properties, and it was set for Chinese environment:

lucene.analyzer.default = org.apache.lucene.analysis.standard.StandardAnalyzer
lucene.analyzer.chinese = org.apache.lucene.analysis.cjk.CJKAnalyzer
lucene.analyzer = ${lucene.analyzer.chinese}


You can check if this fix the problem:
1.Stop JForum
2.Change the last line as follows:

lucene.analyzer = ${lucene.analyzer.default}

3.Remove all the files under ${JFORUM_HOME}/WEB-INF/jforumLuceneIndex
4.Start JForum
5.Login as admin and go to Admin Control Panel
6.Regenerate all the index from scratch

發表人: cloph
10 年 前
But that will not allow me to search for 質問 or the other scripts anymore - 2.1.9 that I did install as a test as well uses the standard analyzer - and that doesn't cope well with those at all...

Well - probably have to dig into lucene then.... :-/

EDIT: Well - or try as I've been told smilie
Plain lucene did not have problems with the StandardAnalyzer and the various single-word search terms, so I gave your suggestion a try (although I did overwrite it in the local config and didn't bother deleting the index manually)
So either the version of lucene that comes with 2.1.9 is too old or buggy, or something else was changed. Anyway - with the StandardAnalyzer search works reasonably well. Thanks a lot smilie




會員註冊 / 登入  |  電腦版  |  Jump to top of page