1、使用IndexWriter的addIndexes(Direcotry[] dir)方法将索引合并到一个索引中
2、在合并内存中索引RAMDirectory时,一定将其相应的IndexWriter关闭,以保证滞留在缓存中的文档被刷到RAMDirectory中。
1、使用IndexWriter的addIndexes(Direcotry[] dir)方法将索引合并到一个索引中
2、在合并内存中索引RAMDirectory时,一定将其相应的IndexWriter关闭,以保证滞留在缓存中的文档被刷到RAMDirectory中。