首页->FAQ->显示文章

Google
 

Lucene支持构建搜索的同时进行搜索么?

译自:http://wiki.apache.org/lucene-java/LuceneFAQ#Does_Lucene_allow_searching_and_indexing_simultaneously.3F

支持。但是,IndexReader只能索引它打开时“那个时刻”的索引了的内容。添加还是删除文档,任何对索引的更新,只能在IndexReader重新打开后反映出来。所以,如果程序需要看到最新的更新,必须定时重新打开IndexReader。IndexReader.isCurrent()方法可以帮助你测试在你的IndexReader打开后索引是否被更新过。

所属分类: [lucene] [Java]
tag: IndexReader, 同时, 更新,

tinyfool发布于2009年10月14日 12:37