Module org.elasticsearch.server
Class IdBloomFilterSupplier
java.lang.Object
org.elasticsearch.index.codec.bloomfilter.IdBloomFilterSupplier
- All Implemented Interfaces:
Closeable,AutoCloseable
Owns the
DocValuesProducer dedicated to bloom-filter lookups and vends per-caller
BloomFilter instances from it.
Thread-safety contract: DocValuesProducer.getBinary(org.apache.lucene.index.FieldInfo) returns a new, independent
BinaryDocValues reader on every call, each backed by its own
I/O buffer. Callers must therefore invoke createBloomFilterInstance() once per logical
lookup context (e.g. once per TermsEnum obtained via
Terms.iterator()) and must not share the returned
BloomFilter across threads. Sharing a single BloomFilter across threads would
race on the mutable buffer state of its underlying
RandomAccessInput.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Returns aBloomFilterfor the_idfield backed by a freshly obtained reader from the underlyingDocValuesProducer.
-
Constructor Details
-
IdBloomFilterSupplier
- Throws:
IOException
-
-
Method Details
-
createBloomFilterInstance
Returns aBloomFilterfor the_idfield backed by a freshly obtained reader from the underlyingDocValuesProducer. Must be called once per lookup context; the returned instance must not be shared across threads.- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-