Show / Hide Table of Contents

    Class BloomFilteringPostingsFormat

    A PostingsFormat useful for low doc-frequency fields such as primary keys. Bloom filters are maintained in a ".blm" file which offers "fast-fail" for reads in segments known to have no record of the key. A choice of delegate PostingsFormat is used to record all other Postings data.

    A choice of BloomFilterFactory can be passed to tailor Bloom Filter settings on a per-field basis. The default configuration is DefaultBloomFilterFactory which allocates a ~8mb bitset and hashes values using MurmurHash2. This should be suitable for most purposes.

    The format of the blm file is as follows:

    • BloomFilter (.blm) --> Header, DelegatePostingsFormatName, NumFilteredFields, FilterNumFilteredFields, Footer
    • Filter --> FieldNumber, FuzzySet
    • FuzzySet -->See Serialize(DataOutput)
    • Header --> CodecHeader ()
    • DelegatePostingsFormatName --> String () The name of a ServiceProvider registered PostingsFormat
    • NumFilteredFields --> Uint32 ()
    • FieldNumber --> Uint32 () The number of the field in this segment
    • Footer --> CodecFooter (WriteFooter(IndexOutput))

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    PostingsFormat
    BloomFilteringPostingsFormat
    Inherited Members
    PostingsFormat.EMPTY
    PostingsFormat.SetPostingsFormatFactory(IPostingsFormatFactory)
    PostingsFormat.GetPostingsFormatFactory()
    PostingsFormat.Name
    PostingsFormat.ToString()
    PostingsFormat.ForName(String)
    PostingsFormat.AvailablePostingsFormats
    Namespace: Lucene.Net.Codecs.Bloom
    Assembly: Lucene.Net.Codecs.dll
    Syntax
    public sealed class BloomFilteringPostingsFormat : PostingsFormat

    Constructors

    | Improve this Doc View Source

    BloomFilteringPostingsFormat()

    Used only by core Lucene at read-time via Service Provider instantiation - do not use at Write-time in application code.

    Declaration
    public BloomFilteringPostingsFormat()
    | Improve this Doc View Source

    BloomFilteringPostingsFormat(PostingsFormat)

    Creates Bloom filters for a selection of fields created in the index. This is recorded as a set of Bitsets held as a segment summary in an additional "blm" file. This PostingsFormat delegates to a choice of delegate PostingsFormat for encoding all other postings data. This choice of constructor defaults to the DefaultBloomFilterFactory for configuring per-field BloomFilters.

    Declaration
    public BloomFilteringPostingsFormat(PostingsFormat delegatePostingsFormat)
    Parameters
    Type Name Description
    PostingsFormat delegatePostingsFormat

    The PostingsFormat that records all the non-bloom filter data i.e. postings info.

    | Improve this Doc View Source

    BloomFilteringPostingsFormat(PostingsFormat, BloomFilterFactory)

    Creates Bloom filters for a selection of fields created in the index. This is recorded as a set of Bitsets held as a segment summary in an additional "blm" file. This PostingsFormat delegates to a choice of delegate PostingsFormat for encoding all other postings data.

    Declaration
    public BloomFilteringPostingsFormat(PostingsFormat delegatePostingsFormat, BloomFilterFactory bloomFilterFactory)
    Parameters
    Type Name Description
    PostingsFormat delegatePostingsFormat

    The PostingsFormat that records all the non-bloom filter data i.e. postings info.

    BloomFilterFactory bloomFilterFactory

    The BloomFilterFactory responsible for sizing BloomFilters appropriately.

    Fields

    | Improve this Doc View Source

    VERSION_CHECKSUM

    Declaration
    public static readonly int VERSION_CHECKSUM
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    VERSION_CURRENT

    Declaration
    public static readonly int VERSION_CURRENT
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    VERSION_START

    Declaration
    public static readonly int VERSION_START
    Field Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    FieldsConsumer(SegmentWriteState)

    Declaration
    public override FieldsConsumer FieldsConsumer(SegmentWriteState state)
    Parameters
    Type Name Description
    SegmentWriteState state
    Returns
    Type Description
    FieldsConsumer
    Overrides
    PostingsFormat.FieldsConsumer(SegmentWriteState)
    | Improve this Doc View Source

    FieldsProducer(SegmentReadState)

    Declaration
    public override FieldsProducer FieldsProducer(SegmentReadState state)
    Parameters
    Type Name Description
    SegmentReadState state
    Returns
    Type Description
    FieldsProducer
    Overrides
    PostingsFormat.FieldsProducer(SegmentReadState)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)