我读了一些关于Lucene的文件; 我也阅读了这个链接中的文档(http://lucene.sourceforge.net/talks/pisa).
我真的不明白Lucene如何索引文档并且不了解Lucene用于索引的算法?
在上面的链接中,它表示Lucene使用此算法进行索引:
- 增量算法:
- 维护一堆段索引
- 为每个传入文档创建索引
- 将新索引推入堆栈
- 令b = 10为合并因子; M = 8
for (size = 1; size < M; size *= b) {
if (there are b indexes with size docs on top of the stack) {
pop them off the stack;
merge them into a single index;
push the merged index onto the stack;
} else {
break;
}
}
Run Code Online (Sandbox Code Playgroud)
该算法如何提供优化的索引?
Lucene是否使用B树算法或任何其他算法进行索引 - 或者它是否具有特定算法?