org.apache.lucene.codecs.bloom

Class BloomFilterFactory

    • Method Detail

      • getSetForField

        public abstract FuzzySet getSetForField(SegmentWriteState state,
                                                FieldInfo info)
        Parameters:
        state - The content to be indexed
        info - 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 bits
        initialSet - 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 tested
        fieldInfo - The field with which this filter is associated
        Returns:
        true if the set has reached saturation and should be retired