Module org.elasticsearch.server
Class ES93BloomFilterStoredFieldsFormat
java.lang.Object
org.apache.lucene.codecs.StoredFieldsFormat
org.elasticsearch.index.codec.bloomfilter.ES93BloomFilterStoredFieldsFormat
public class ES93BloomFilterStoredFieldsFormat
extends org.apache.lucene.codecs.StoredFieldsFormat
A stored fields format that builds a Bloom filter for a specific field to enable fast
existence checks, while delegating storage of all other fields to another StoredFieldsFormat.
The field used to build the Bloom filter is not stored, as only its presence needs to be tracked for filtering purposes. This reduces storage overhead while maintaining the ability to quickly determine if a segment might contain the field.
File formats
Bloom filter stored fields are represented by two files:
-
Bloom filter data file (extension .sfbf). This file stores the bloom filter bitset.
-
A bloom filter meta file (extension .sfbfm). This file stores metadata about the bloom filters stored in the bloom filter data file. The in-memory representation can be found in
ES93BloomFilterStoredFieldsFormat.BloomFilterMetadata.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionES93BloomFilterStoredFieldsFormat(BigArrays bigArrays, String segmentSuffix, org.apache.lucene.codecs.StoredFieldsFormat delegate, ByteSizeValue bloomFilterSize, String bloomFilterFieldName) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.codecs.StoredFieldsReaderfieldsReader(org.apache.lucene.store.Directory directory, org.apache.lucene.index.SegmentInfo si, org.apache.lucene.index.FieldInfos fn, org.apache.lucene.store.IOContext context) org.apache.lucene.codecs.StoredFieldsWriterfieldsWriter(org.apache.lucene.store.Directory directory, org.apache.lucene.index.SegmentInfo si, org.apache.lucene.store.IOContext context)
-
Field Details
-
STORED_FIELDS_BLOOM_FILTER_FORMAT_NAME
- See Also:
-
STORED_FIELDS_BLOOM_FILTER_EXTENSION
- See Also:
-
STORED_FIELDS_METADATA_BLOOM_FILTER_EXTENSION
- See Also:
-
-
Constructor Details
-
ES93BloomFilterStoredFieldsFormat
public ES93BloomFilterStoredFieldsFormat(BigArrays bigArrays, String segmentSuffix, org.apache.lucene.codecs.StoredFieldsFormat delegate, ByteSizeValue bloomFilterSize, String bloomFilterFieldName)
-
-
Method Details
-
fieldsReader
public org.apache.lucene.codecs.StoredFieldsReader fieldsReader(org.apache.lucene.store.Directory directory, org.apache.lucene.index.SegmentInfo si, org.apache.lucene.index.FieldInfos fn, org.apache.lucene.store.IOContext context) throws IOException - Specified by:
fieldsReaderin classorg.apache.lucene.codecs.StoredFieldsFormat- Throws:
IOException
-
fieldsWriter
public org.apache.lucene.codecs.StoredFieldsWriter fieldsWriter(org.apache.lucene.store.Directory directory, org.apache.lucene.index.SegmentInfo si, org.apache.lucene.store.IOContext context) throws IOException - Specified by:
fieldsWriterin classorg.apache.lucene.codecs.StoredFieldsFormat- Throws:
IOException
-