You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by Zhiqiang Wang <zh...@innocellence.com> on 2013/12/23 10:39:25 UTC
转发: search issue with lucene.net 2.9.4.1 CJKAnalyzer special characters like '.','-'
Greeting
I use lucene.net to fulfill full-text search function, it works well but find it can’t find out any results if search string containing any special character like '.'or '-'.
For example: Keyword:“ALM-P177” It seems working fine, However, when I tried with the keyword
"ALM-P", "ALM-P1", "ALM-P17", there were no results.
I check CJKTokenizer source code and find it can support below three special characters, but when I add other special characters like ‘.’ Or ‘-’, that can’t work.
if (Char.IsLetterOrDigit(c)
|| ((c == '_') || (c == '+') || (c == '#')))
{
if (length == 0) {
…}
What should I do to solve this issue, would you please give me some suggestions,
Much appreciated
Best Regard
wangzhqiang(Paris)
zhiqiang.wang@innocellence.com<ma...@innocellence.com>