public final class BitsetFilterCache extends AbstractIndexComponent implements org.apache.lucene.index.LeafReader.CoreClosedListener, RemovalListener<java.lang.Object,Cache<org.apache.lucene.search.Query,BitsetFilterCache.Value>>, java.io.Closeable
BitDocIdSet
based filters and is unbounded by size or time.
Use this cache with care, only components that require that a filter is to be materialized as a BitDocIdSet
and require that it should always be around should use this cache, otherwise the
QueryCache
should be used instead.
Modifier and Type | Class and Description |
---|---|
static interface |
BitsetFilterCache.Listener
A listener interface that is executed for each onCache / onRemoval event
|
static class |
BitsetFilterCache.Value |
Modifier and Type | Field and Description |
---|---|
static Setting<java.lang.Boolean> |
INDEX_LOAD_RANDOM_ACCESS_FILTERS_EAGERLY_SETTING |
deprecationLogger, indexSettings, logger
Constructor and Description |
---|
BitsetFilterCache(IndexSettings indexSettings,
BitsetFilterCache.Listener listener) |
Modifier and Type | Method and Description |
---|---|
void |
clear(java.lang.String reason) |
void |
close() |
IndexWarmer.Listener |
createListener(ThreadPool threadPool) |
org.apache.lucene.search.join.BitSetProducer |
getBitSetProducer(org.apache.lucene.search.Query query) |
void |
onClose(java.lang.Object ownerCoreCacheKey) |
void |
onRemoval(RemovalNotification<java.lang.Object,Cache<org.apache.lucene.search.Query,BitsetFilterCache.Value>> notification) |
getIndexSettings, index
public static final Setting<java.lang.Boolean> INDEX_LOAD_RANDOM_ACCESS_FILTERS_EAGERLY_SETTING
public BitsetFilterCache(IndexSettings indexSettings, BitsetFilterCache.Listener listener)
public IndexWarmer.Listener createListener(ThreadPool threadPool)
public org.apache.lucene.search.join.BitSetProducer getBitSetProducer(org.apache.lucene.search.Query query)
public void onClose(java.lang.Object ownerCoreCacheKey)
onClose
in interface org.apache.lucene.index.LeafReader.CoreClosedListener
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public void clear(java.lang.String reason)
public void onRemoval(RemovalNotification<java.lang.Object,Cache<org.apache.lucene.search.Query,BitsetFilterCache.Value>> notification)
onRemoval
in interface RemovalListener<java.lang.Object,Cache<org.apache.lucene.search.Query,BitsetFilterCache.Value>>