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-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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BloomFilterFactory
public BloomFilterFactory()
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
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.