DefaultBloomFilterFactory (Lucene 10.5.1 codecs API)
Description: declaration: package: org.apache.lucene.codecs.bloom, class: DefaultBloomFilterFactory

Package org.apache.lucene.codecs.bloom

# Class DefaultBloomFilterFactory

java.lang.Object
org.apache.lucene.codecs.bloom.BloomFilterFactory
org.apache.lucene.codecs.bloom.DefaultBloomFilterFactory

public class DefaultBloomFilterFactory extends BloomFilterFactory
Default policy is to allocate a bitset targeting a max false-positive rate of 10%. Bits are set via MurmurHash3 hashing function.

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultBloomFilterFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FuzzySet`
  `getSetForField(SegmentWriteState state, FieldInfo info)`
  `boolean`
  `isSaturated(FuzzySet bloomFilter, FieldInfo fieldInfo)`
  Used to determine if the given filter has reached saturation and should be retired i.e.

  ### Methods inherited from class org.apache.lucene.codecs.bloom.BloomFilterFactory

  `downsize`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DefaultBloomFilterFactory

    public DefaultBloomFilterFactory()

- ## Method Details

  - ### getSetForField

    public FuzzySet getSetForField(SegmentWriteState state, FieldInfo info)
    Specified by:
      `getSetForField` in class `BloomFilterFactory`
    Parameters:
      `state` - The content to be indexed
      `info` - the field requiring a BloomFilter
    Returns:
      An appropriately sized set or null if no BloomFiltering required

  - ### isSaturated

    public boolean isSaturated(FuzzySet bloomFilter, FieldInfo fieldInfo)
    Description copied from class: `BloomFilterFactory`
    Used to determine if the given filter has reached saturation and should be retired i.e. not saved any more
    Specified by:
      `isSaturated` in class `BloomFilterFactory`
    Parameters:
      `bloomFilter` - The bloomFilter being tested
      `fieldInfo` - The field with which this filter is associated
    Returns:
      true if the set has reached saturation and should be retired