• API

    Show / Hide Table of Contents

    Class IndexCommit

    Expert: represents a single commit into an index as seen by the IndexDeletionPolicy or IndexReader.

    Changes to the content of an index are made visible only after the writer who made that change commits by writing a new segments file (segments_N). This point in time, when the action of writing of a new segments file to the directory is completed, is an index commit.

    Each index commit point has a unique segments file associated with it. The segments file associated with a later index commit point would have a larger N.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    IndexCommit
    Implements
    System.IComparable<IndexCommit>
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class IndexCommit : IComparable<IndexCommit>

    Constructors

    | Improve this Doc View Source

    IndexCommit()

    Sole constructor. (For invocation by subclass constructors, typically implicit.)

    Declaration
    protected IndexCommit()

    Properties

    | Improve this Doc View Source

    Directory

    Returns the Directory for the index.

    Declaration
    public abstract Directory Directory { get; }
    Property Value
    Type Description
    Directory
    | Improve this Doc View Source

    FileNames

    Returns all index files referenced by this commit point.

    Declaration
    public abstract ICollection<string> FileNames { get; }
    Property Value
    Type Description
    System.Collections.Generic.ICollection<System.String>
    | Improve this Doc View Source

    Generation

    Returns the generation (the _N in segments_N) for this IndexCommit

    Declaration
    public abstract long Generation { get; }
    Property Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    IsDeleted

    Returns true if this commit should be deleted; this is only used by IndexWriter after invoking the IndexDeletionPolicy.

    Declaration
    public abstract bool IsDeleted { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    SegmentCount

    Returns number of segments referenced by this commit.

    Declaration
    public abstract int SegmentCount { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    SegmentsFileName

    Get the segments file (segments_N) associated with this commit point.

    Declaration
    public abstract string SegmentsFileName { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    UserData

    Returns userData, previously passed to SetCommitData(IDictionary<String, String>)} for this commit.
    The dictionary is System.String -> System.String.

    Declaration
    public abstract IDictionary<string, string> UserData { get; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.String>

    Methods

    | Improve this Doc View Source

    CompareTo(IndexCommit)

    Declaration
    public virtual int CompareTo(IndexCommit commit)
    Parameters
    Type Name Description
    IndexCommit commit
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Delete()

    Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy.

    Upon calling this, the writer is notified that this commit point should be deleted.

    Decision that a commit-point should be deleted is taken by the IndexDeletionPolicy in effect and therefore this should only be called by its OnInit<T>(IList<T>) or OnCommit<T>(IList<T>) methods.

    Declaration
    public abstract void Delete()
    | Improve this Doc View Source

    Equals(Object)

    Two IndexCommits are equal if both their Directory and versions are equal.

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    System.Object other
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()

    Implements

    System.IComparable<T>
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)