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 with 10% saturation given a unique term per document. Bits are set via MurmurHash2 hashing function.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultBloomFilterFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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 Detail

    - #### DefaultBloomFilterFactory

          public DefaultBloomFilterFactory()

  - ### Method Detail

    - #### 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

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.