Show / Hide Table of Contents

    Class SegmentInfos.FindSegmentsFile

    Utility class for executing code that needs to do something with the current segments file. This is necessary with lock-less commits because from the time you locate the current segments file name, until you actually open it, read its contents, or check modified time, etc., it could have been deleted due to a writer commit finishing.

    Inheritance
    System.Object
    SegmentInfos.FindSegmentsFile
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class FindSegmentsFile : object

    Constructors

    | Improve this Doc View Source

    FindSegmentsFile(Directory)

    Sole constructor.

    Declaration
    public FindSegmentsFile(Directory directory)
    Parameters
    Type Name Description
    Directory directory

    Methods

    | Improve this Doc View Source

    DoBody(String)

    Subclass must implement this. The assumption is an will be thrown if something goes wrong during the processing that could have been caused by a writer committing.

    Declaration
    protected abstract object DoBody(string segmentFileName)
    Parameters
    Type Name Description
    System.String segmentFileName
    Returns
    Type Description
    System.Object
    | Improve this Doc View Source

    Run()

    Locate the most recent segments file and run DoBody(String) on it.

    Declaration
    public virtual object Run()
    Returns
    Type Description
    System.Object
    | Improve this Doc View Source

    Run(IndexCommit)

    Run DoBody(String) on the provided commit.

    Declaration
    public virtual object Run(IndexCommit commit)
    Parameters
    Type Name Description
    IndexCommit commit
    Returns
    Type Description
    System.Object
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)