Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试找出从损坏的索引中恢复的策略。为了“掌握”这可能发生的频率,我主要想知道可能导致索引损坏的事情,其次,如果存在关于这些事件发生概率的信息,那么虽然不是那么重要。
大多数时候索引应该由于编写器关闭不当而损坏。
IndexWriter writer=new IndexWriter(dir,analyzer,true); writer.addDocument(doc); writer.close(false);