lucene indexingChain

lucene的indexingChain的生成,主要涉及两个类LiveIndexWriterConfig和DocumentsWriter. LiveIndexWriterConfig中得到indexingChain和indexerThreadPool, 而后在生成DocumentsWriter时初始化indexerThreadPool, 在初始化时会生成DocumentsWriterPerThread和ThreadState的一一对应关系,在生成DocumentsWriterPerThread时,会调用IndexingChain的getChain方法。这样每一个DocumentsWriterPerThread就得到了本身的indexingChain.这样在调用dwpt的updateDocument方法时就会逐一调用indexingChain中的consumer.
相关文章
相关标签/搜索