Show / Hide Table of Contents

    Class PerFieldPostingsFormat

    Enables per field postings support.

    Note, when extending this class, the name (Name) is written into the index. In order for the field to be read, the name must resolve to your implementation via ForName(String). This method uses GetPostingsFormat(String) to resolve format names. See DefaultPostingsFormatFactory for information about how to implement your own PostingsFormat.

    Files written by each posting format have an additional suffix containing the format name. For example, in a per-field configuration instead of _1.prx filenames would look like _1_Lucene40_0.prx.

    @lucene.experimental

    Inheritance
    System.Object
    PostingsFormat
    PerFieldPostingsFormat
    Inherited Members
    PostingsFormat.EMPTY
    PostingsFormat.SetPostingsFormatFactory(IPostingsFormatFactory)
    PostingsFormat.GetPostingsFormatFactory()
    PostingsFormat.Name
    PostingsFormat.ToString()
    PostingsFormat.ForName(String)
    PostingsFormat.AvailablePostingsFormats
    Namespace: Lucene.Net.Codecs.PerField
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class PerFieldPostingsFormat : PostingsFormat

    Constructors

    | Improve this Doc View Source

    PerFieldPostingsFormat()

    Sole constructor.

    Declaration
    public PerFieldPostingsFormat()

    Fields

    | Improve this Doc View Source

    PER_FIELD_FORMAT_KEY

    FieldInfo attribute name used to store the format name for each field.

    Declaration
    public static readonly string PER_FIELD_FORMAT_KEY
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    PER_FIELD_SUFFIX_KEY

    FieldInfo attribute name used to store the segment suffix name for each field.

    Declaration
    public static readonly string PER_FIELD_SUFFIX_KEY
    Field Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    FieldsConsumer(SegmentWriteState)

    Declaration
    public override sealed 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 sealed FieldsProducer FieldsProducer(SegmentReadState state)
    Parameters
    Type Name Description
    SegmentReadState state
    Returns
    Type Description
    FieldsProducer
    Overrides
    PostingsFormat.FieldsProducer(SegmentReadState)
    | Improve this Doc View Source

    GetPostingsFormatForField(String)

    Returns the postings format that should be used for writing new segments of field.

    The field to format mapping is written to the index, so this method is only invoked when writing, not when reading.

    Declaration
    public abstract PostingsFormat GetPostingsFormatForField(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    PostingsFormat

    See Also

    IPostingsFormatFactory
    DefaultPostingsFormatFactory
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)