Take the 2-minute tour ×

I am using Lucene seacrh engine for fulltext search it give search result for non ascii character also but the problem is suppose I added a text 帕普部分分配数量 and will search with only one character 帕 it will give result but when will search with full non-ascii word 帕普部分分配数量 it is not giving any result, the strange thing is when I put spaces between each charcter for example 帕 普 部 分 分 配 数 量 and theb will search it give result

Will realy appreciate any help


share|improve this question
add comment

2 Answers

Be sure to use the same Analyzer when indexing and searching.

What happens is your Analyzer is indexing each characters as an individual Term, and then if you search with a different analyzer (IE WhiteSpaceAnalyzer) it searches for a Token containing all the specified characters in your Query.

To search for a sequence of characters like you want, you need to use the same Analyzer and have the QueryParser build a PhraseQuery with all the individual Tokens.

Some sample code of your indexing and searching routines would make it easier to help you.

share|improve this answer
add comment

Agreed you should use same analyzer for Indexing as well as Searching.

share|improve this answer
add comment

Your Answer


