java.io.Closeable
, java.lang.AutoCloseable
, org.apache.lucene.index.IndexReader.ClosedListener
, RemovalListener<org.apache.lucene.index.IndexReader.CacheKey,Cache<org.apache.lucene.search.Query,BitsetFilterCache.Value>>
, IndexComponent
public final class BitsetFilterCache extends AbstractIndexComponent implements org.apache.lucene.index.IndexReader.ClosedListener, RemovalListener<org.apache.lucene.index.IndexReader.CacheKey,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 | Description |
---|---|---|
static interface |
BitsetFilterCache.Listener |
A listener interface that is executed for each onCache / onRemoval event
|
static class |
BitsetFilterCache.Value |
Modifier and Type | Field | Description |
---|---|---|
static Setting<java.lang.Boolean> |
INDEX_LOAD_RANDOM_ACCESS_FILTERS_EAGERLY_SETTING |
deprecationLogger, indexSettings, logger
Constructor | Description |
---|---|
BitsetFilterCache(IndexSettings indexSettings,
BitsetFilterCache.Listener listener) |
Modifier and Type | Method | 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(org.apache.lucene.index.IndexReader.CacheKey ownerCoreCacheKey) |
|
void |
onRemoval(RemovalNotification<org.apache.lucene.index.IndexReader.CacheKey,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(org.apache.lucene.index.IndexReader.CacheKey ownerCoreCacheKey)
onClose
in interface org.apache.lucene.index.IndexReader.ClosedListener
public void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
public void clear(java.lang.String reason)
public void onRemoval(RemovalNotification<org.apache.lucene.index.IndexReader.CacheKey,Cache<org.apache.lucene.search.Query,BitsetFilterCache.Value>> notification)
onRemoval
in interface RemovalListener<org.apache.lucene.index.IndexReader.CacheKey,Cache<org.apache.lucene.search.Query,BitsetFilterCache.Value>>