摘要:
一. TermHashPerField.add()方法 这一章继续上面的内容, 上一章谈到TermHashPerField.add()方法就是把一个Term加入到posting表的过程, 那么下面我将从算法的角度来分析这个add()方法: final char[] tokenText = termAtt.termBuffer();; final int to... 阅读全文
posted @ 2010-01-09 22:27
LeftNotEasy
阅读(1247)
评论(0)
推荐(0)
摘要:
一. consumer的来源 接着上一小节的内容, 还是从这一段程序(位于DocumentWriter.updateDocument(Document, Analyzer, Term) 中继续. try { // This call is not synchronized and does all the // work final DocWriter pe... 阅读全文
posted @ 2010-01-09 16:49
LeftNotEasy
阅读(2578)
评论(0)
推荐(1)
摘要:
这一小结的内容我将大概讲讲IndexFiles的一个过程. 为了方便查看, 还是把IndexFile.java的源代码放在前面. 1: public class IndexFiles { 2: 3: private IndexFiles() {} 4: 5: static final File INDEX_DIR = new File("index"); 6: 7: /** Index all t... 阅读全文
posted @ 2010-01-09 12:57
LeftNotEasy
阅读(3679)
评论(0)
推荐(0)