org.apache.lucene.codecs.bloom
Class DefaultBloomFilterFactory
java.lang.Object
org.apache.lucene.codecs.bloom.BloomFilterFactory
org.apache.lucene.codecs.bloom.DefaultBloomFilterFactory
public class DefaultBloomFilterFactory
- extends BloomFilterFactory
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultBloomFilterFactory
public DefaultBloomFilterFactory()
getSetForField
public FuzzySet getSetForField(SegmentWriteState state,
FieldInfo info)
- Specified by:
getSetForField
in class BloomFilterFactory
- Parameters:
state
- The content to be indexedinfo
- the field requiring a BloomFilter
- Returns:
- An appropriately sized set or null if no BloomFiltering required
isSaturated
public boolean isSaturated(FuzzySet bloomFilter,
FieldInfo fieldInfo)
- 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 class BloomFilterFactory
- 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
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.