/** * The analyzer governs how words are tokenized. The standard anaylyzer * does a decent job in most cases, but could be replaced under certain * circumstances. We make the analyzer protected so that the DbQuery class * can also reference it (indexing and searching should use the same * analyzer). */ protected static Analyzer analyzer = new StandardAnalyzer();
替換為:
protected static Analyzer analyzer = new ChineseAnalyzer();