Hi, all,
The following words work fine with English text files. But the while
loop is skipped when it works on Chinese text files. By the way, the
files are already indexed with ChineseAnalyzer. Could you give me a
hand? Thanks so much!
Li Bing
=============== Code ==================
......
IndexSearcher indexSearcher = new IndexSearcher(indexPath);
Term term = new Term(searchType, searchKey);
TermDocs termDocs = indexSearcher.GetIndexReader().TermDocs(term);
while (termDocs.Next())
{
Console.WriteLine(termDocs.Freq());
Console.WriteLine(indexSearcher.GetIndexReader().Document(termDocs.Doc()));
}
......
======================================