Package 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-timeFuzzySet
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
Constructors Constructor Description BloomFilterFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description FuzzySet
downsize(FieldInfo fieldInfo, FuzzySet initialSet)
Called when downsizing bitsets for serializationabstract 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.
-
-
-
Method Detail
-
getSetForField
public abstract FuzzySet getSetForField(SegmentWriteState state, FieldInfo info)
- Parameters:
state
- The content to be indexedinfo
- 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 bitsinitialSet
- 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 testedfieldInfo
- The field with which this filter is associated- Returns:
- true if the set has reached saturation and should be retired
-
-