## org.apache.lucene.codecs.bloom
Class BloomFilterFactory

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

Direct Known Subclasses:
  DefaultBloomFilterFactory

    public abstract class BloomFilterFactory

extends Object

Class used to create index-time `FuzzySet` appropriately configured for each field. Also called to right-size bitsets for serialization.

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

Constructor Summary
`BloomFilterFactory()`

Method Summary
`FuzzySet` `downsize(FieldInfo fieldInfo, FuzzySet initialSet)` Called when downsizing bitsets for serialization
`abstract FuzzySet` `getSetForField(SegmentWriteState state, FieldInfo info)`
`abstract 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 java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BloomFilterFactory

    public BloomFilterFactory()

Method Detail

### getSetForField

    public abstract FuzzySet getSetForField(SegmentWriteState state,
                                            FieldInfo info)

  Parameters:
    `state` - The content to be indexed
    `info` - the field requiring a BloomFilter
  Returns:
    An appropriately sized set or null if no BloomFiltering required

### downsize

    public FuzzySet downsize(FieldInfo fieldInfo,
                             FuzzySet initialSet)

  Called when downsizing bitsets for serialization

  Parameters:
    `fieldInfo` - The field with sparse set bits
    `initialSet` - The bits accumulated
  Returns:
    null or a hopefully more densely packed, smaller bitset

### isSaturated

    public abstract boolean isSaturated(FuzzySet bloomFilter,
                                        FieldInfo fieldInfo)

  Used to determine if the given filter has reached saturation and should be retired i.e. not saved any more

  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.