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
-
Method Summary
Modifier and TypeMethodDescriptiongetSetForField
(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
-
Constructor Details
-
DefaultBloomFilterFactory
public DefaultBloomFilterFactory()
-
-
Method Details
-
getSetForField
- Specified by:
getSetForField
in 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: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 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
-