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:

  1. Bloom filter data file (extension .sfbf). This file stores the bloom filter bitset.

  2. 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.

  • Field Details

    • STORED_FIELDS_BLOOM_FILTER_FORMAT_NAME

      public static final String STORED_FIELDS_BLOOM_FILTER_FORMAT_NAME
      See Also:
    • STORED_FIELDS_BLOOM_FILTER_EXTENSION

      public static final String STORED_FIELDS_BLOOM_FILTER_EXTENSION
      See Also:
    • STORED_FIELDS_METADATA_BLOOM_FILTER_EXTENSION

      public static final String 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:
      fieldsReader in class org.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:
      fieldsWriter in class org.apache.lucene.codecs.StoredFieldsFormat
      Throws:
      IOException