Package org.apache.lucene.codecs.bloom
Class BloomFilterFactory
java.lang.Object
org.apache.lucene.codecs.bloom.BloomFilterFactory
- Direct Known Subclasses:
DefaultBloomFilterFactory
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
-
Method Summary
Modifier and TypeMethodDescriptionCalled 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.
-
Constructor Details
-
BloomFilterFactory
public BloomFilterFactory()
-
-
Method Details
-
getSetForField
- Parameters:
state
- The content to be indexedinfo
- the field requiring a BloomFilter- Returns:
- An appropriately sized set or null if no BloomFiltering required
-
downsize
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
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
-