Show / Hide Table of Contents

    Class ReuseStrategy

    Strategy defining how TokenStreamComponents are reused per call to GetTokenStream(String, TextReader).

    Inheritance
    System.Object
    ReuseStrategy
    Analyzer.GlobalReuseStrategy
    Analyzer.PerFieldReuseStrategy
    Namespace: Lucene.Net.Analysis
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class ReuseStrategy : object

    Methods

    | Improve this Doc View Source

    GetReusableComponents(Analyzer, String)

    Gets the reusable TokenStreamComponents for the field with the given name.

    Declaration
    public abstract TokenStreamComponents GetReusableComponents(Analyzer analyzer, string fieldName)
    Parameters
    Type Name Description
    Analyzer analyzer

    Analyzer from which to get the reused components. Use GetStoredValue(Analyzer) and SetStoredValue(Analyzer, Object) to access the data on the Analyzer.

    System.String fieldName

    Name of the field whose reusable TokenStreamComponents are to be retrieved

    Returns
    Type Description
    TokenStreamComponents

    Reusable TokenStreamComponents for the field, or null if there was no previous components for the field

    | Improve this Doc View Source

    GetStoredValue(Analyzer)

    Returns the currently stored value.

    Declaration
    protected object GetStoredValue(Analyzer analyzer)
    Parameters
    Type Name Description
    Analyzer analyzer
    Returns
    Type Description
    System.Object

    Currently stored value or null if no value is stored

    | Improve this Doc View Source

    SetReusableComponents(Analyzer, String, TokenStreamComponents)

    Stores the given TokenStreamComponents as the reusable components for the field with the give name.

    Declaration
    public abstract void SetReusableComponents(Analyzer analyzer, string fieldName, TokenStreamComponents components)
    Parameters
    Type Name Description
    Analyzer analyzer

    Analyzer

    System.String fieldName

    Name of the field whose TokenStreamComponents are being set

    TokenStreamComponents components

    TokenStreamComponents which are to be reused for the field

    | Improve this Doc View Source

    SetStoredValue(Analyzer, Object)

    Sets the stored value.

    Declaration
    protected void SetStoredValue(Analyzer analyzer, object storedValue)
    Parameters
    Type Name Description
    Analyzer analyzer

    Analyzer

    System.Object storedValue

    Value to store

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