grosjo / fts-xapian

Dovecot FTS plugin based on Xapian
GNU Lesser General Public License v2.1
97 stars 21 forks source link

CJK support? #85

Closed iredmail closed 3 years ago

iredmail commented 3 years ago

Dear @grosjo

I tried to search a Chinese word in Roundcube webmail, with verbose=1 in dovecot config file, i can see what it querying in Dovecot log file. for example:

... FTS Xapian: QUery 'subject:"test" OR from:"test" OR to:"test" OR cc:"test" OR bcc:"test" OR body:"test"' -> 1013 results

But with a Chinese word, e.g. 标题, the QUery value is empty. If i prepend a wildcard mark, *标题, it correctly gets the query string, but nothing matched, although i'm sure there's at least one testing message should be matched.

... FTS Xapian: QUery 'subject:"*标题" OR from:"*标题" OR to:"*标题" OR cc:"*标题" OR bcc:"*标题" OR body:"*标题"' -> 0 results
grosjo commented 3 years ago

@iredmail Is it solved ?

iredmail commented 3 years ago

No issue at all, just requires at least 3 (Chinese) characters. I wonder is it possible to reduce it to 2?

grosjo commented 3 years ago

Try putting "partial=2" instead of "partial=3" in the dovecot.conf file

iredmail commented 3 years ago

Thanks. :)