Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class SegmentCommitInfo

    Embeds a [read-only] SegmentInfo and adds per-commit fields.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    SegmentCommitInfo
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.dll
    Syntax
    public class SegmentCommitInfo

    Constructors

    SegmentCommitInfo(SegmentInfo, int, long, long)

    Sole constructor.

    Declaration
    public SegmentCommitInfo(SegmentInfo info, int delCount, long delGen, long fieldInfosGen)
    Parameters
    Type Name Description
    SegmentInfo info

    SegmentInfo that we wrap

    int delCount

    number of deleted documents in this segment

    long delGen

    deletion generation number (used to name deletion files)

    long fieldInfosGen

    FieldInfos generation number (used to name field-infos files)

    Properties

    DelCount

    Returns the number of deleted docs in the segment.

    Declaration
    public virtual int DelCount { get; }
    Property Value
    Type Description
    int

    DelGen

    Returns generation number of the live docs file or -1 if there are no deletes yet.

    Declaration
    public virtual long DelGen { get; }
    Property Value
    Type Description
    long

    FieldInfosGen

    Returns the generation number of the field infos file or -1 if there are no field updates yet.

    Declaration
    public virtual long FieldInfosGen { get; }
    Property Value
    Type Description
    long

    HasDeletions

    Returns true if there are any deletions for the segment at this commit.

    Declaration
    public virtual bool HasDeletions { get; }
    Property Value
    Type Description
    bool

    HasFieldUpdates

    Returns true if there are any field updates for the segment in this commit.

    Declaration
    public virtual bool HasFieldUpdates { get; }
    Property Value
    Type Description
    bool

    Info

    The SegmentInfo that we wrap.

    Declaration
    public SegmentInfo Info { get; }
    Property Value
    Type Description
    SegmentInfo

    NextDelGen

    Returns the next available generation number of the live docs file.

    Declaration
    public virtual long NextDelGen { get; }
    Property Value
    Type Description
    long

    NextFieldInfosGen

    Returns the next available generation number of the FieldInfos files.

    Declaration
    public virtual long NextFieldInfosGen { get; }
    Property Value
    Type Description
    long

    UpdatesFiles

    Returns the per generation updates files.

    Declaration
    public virtual IDictionary<long, ISet<string>> UpdatesFiles { get; }
    Property Value
    Type Description
    IDictionary<long, ISet<string>>

    Methods

    Clone()

    Embeds a [read-only] SegmentInfo and adds per-commit fields.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public virtual object Clone()
    Returns
    Type Description
    object

    GetFiles()

    Returns all files in use by this segment.

    Declaration
    public virtual ICollection<string> GetFiles()
    Returns
    Type Description
    ICollection<string>

    GetSizeInBytes()

    Returns total size in bytes of all files for this segment.

    NOTE: this value is not correct for 3.0 segments that have shared docstores. To get the correct value, upgrade!
    Declaration
    public virtual long GetSizeInBytes()
    Returns
    Type Description
    long

    SetGenUpdatesFiles(IDictionary<long, ISet<string>>)

    Sets the updates file names per generation. Does not deep clone the map.

    Declaration
    public virtual void SetGenUpdatesFiles(IDictionary<long, ISet<string>> genUpdatesFiles)
    Parameters
    Type Name Description
    IDictionary<long, ISet<string>> genUpdatesFiles

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    ToString(Directory, int)

    Returns a description of this segment.

    Declaration
    public virtual string ToString(Directory dir, int pendingDelCount)
    Parameters
    Type Name Description
    Directory dir
    int pendingDelCount
    Returns
    Type Description
    string
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.