Package org.apache.lucene.codecs.bloom
Class DefaultBloomFilterFactory
java.lang.Object
org.apache.lucene.codecs.bloom.BloomFilterFactory
org.apache.lucene.codecs.bloom.DefaultBloomFilterFactory
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 -
Method Summary
Modifier and TypeMethodDescriptiongetSetForField(SegmentWriteState state, FieldInfo info) booleanisSaturated(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
-
Constructor Details
-
DefaultBloomFilterFactory
public DefaultBloomFilterFactory()
-
-
Method Details
-
getSetForField
- Specified by:
getSetForFieldin classBloomFilterFactory- Parameters:
state- The content to be indexedinfo- the field requiring a BloomFilter- Returns:
- An appropriately sized set or null if no BloomFiltering required
-
isSaturated
Description copied from class:BloomFilterFactoryUsed to determine if the given filter has reached saturation and should be retired i.e. not saved any more- Specified by:
isSaturatedin classBloomFilterFactory- 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
-