Indexing和Searching时都需要Analysis

Indexing和Searching时都需要Analysis

一个是把document拆成token, 索引起来。比如在lucene里,

IndexWriter writer = new IndexWriter(dir, analyzer, ...); 

另一个是把用户的输入拆成token,再跟索引匹配


QueryParser parser = new QueryParser(Version.xxx, "contents", analyzer"); 

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.