All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.lucene.index.XIndexWriter Maven / Gradle / Ivy

There is a newer version: 8.16.0
Show newest version
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);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy