remove XIndexWriter
removing the buffered deletes bloom filter no longer requires setting the bloom filter on it
This commit is contained in:
parent
f9b0fcb3a3
commit
3d4ca81c29
|
@ -1,29 +0,0 @@
|
|||
package org.apache.lucene.index;
|
||||
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.store.LockObtainFailedException;
|
||||
import org.elasticsearch.common.logging.ESLogger;
|
||||
import org.elasticsearch.index.cache.bloom.BloomCache;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class XIndexWriter extends IndexWriter {
|
||||
|
||||
private final ESLogger logger;
|
||||
|
||||
public XIndexWriter(Directory d, IndexWriterConfig conf, ESLogger logger, BloomCache bloomCache) throws CorruptIndexException, LockObtainFailedException, IOException {
|
||||
super(d, conf);
|
||||
this.logger = logger;
|
||||
if (bufferedDeletesStream instanceof XBufferedDeletesStream) {
|
||||
logger.debug("using bloom filter enhanced delete handling");
|
||||
((XBufferedDeletesStream) bufferedDeletesStream).setBloomCache(bloomCache);
|
||||
}
|
||||
}
|
||||
|
||||
public static interface XBufferedDeletesStream {
|
||||
|
||||
void setBloomCache(BloomCache bloomCache);
|
||||
}
|
||||
}
|
|
@ -1362,7 +1362,7 @@ public class RobinEngine extends AbstractIndexShardComponent implements Engine {
|
|||
config.setReaderTermsIndexDivisor(termIndexDivisor);
|
||||
config.setMaxThreadStates(indexConcurrency);
|
||||
|
||||
indexWriter = new XIndexWriter(store.directory(), config, logger, bloomCache);
|
||||
indexWriter = new IndexWriter(store.directory(), config);
|
||||
} catch (IOException e) {
|
||||
safeClose(indexWriter);
|
||||
throw e;
|
||||
|
|
Loading…
Reference in New Issue