Show / Hide Table of Contents

    Class AnalyzerFactoryTask

    Analyzer factory construction task. The name given to the constructed factory may be given to NewAnalyzerTask, which will call Create().

    Inheritance
    System.Object
    PerfTask
    AnalyzerFactoryTask
    Inherited Members
    PerfTask.m_logStep
    PerfTask.m_params
    PerfTask.NEW_LINE
    PerfTask.SetRunInBackground(Int32)
    PerfTask.RunInBackground
    PerfTask.BackgroundDeltaPriority
    PerfTask.Stop
    PerfTask.StopNow()
    PerfTask.Clone()
    PerfTask.Dispose()
    PerfTask.Dispose(Boolean)
    PerfTask.RunAndMaybeStats(Boolean)
    PerfTask.GetName()
    PerfTask.SetName(String)
    PerfTask.RunData
    PerfTask.Depth
    PerfTask.ToString()
    PerfTask.GetLogMessage(Int32)
    PerfTask.ShouldNeverLogAtStart
    PerfTask.ShouldNotRecordStats
    PerfTask.Setup()
    PerfTask.TearDown()
    PerfTask.Params
    PerfTask.DisableCounting
    PerfTask.AlgLineNum
    Namespace: Lucene.Net.Benchmarks.ByTask.Tasks
    Assembly: Lucene.Net.Benchmark.dll
    Syntax
    public class AnalyzerFactoryTask : PerfTask
    Remarks

    Params are in the form argname:argvalue or argname:"argvalue" or argname:'argvalue'; use backslashes to escape '"' or "'" inside a quoted value when it's used as the enclosing quotation mark,

    Specify params in a comma separated list of the following, in order:

      • Required: name:analyzer-factory-name
      • Optional: positionIncrementGap:int value (default: 0)
      • Optional: offsetGap:int value (default: 1)
    1. zero or more CharFilterFactory's, followed by
    2. exactly one TokenizerFactory, followed by
    3. zero or more TokenFilterFactory's

    Each component analysis factory map specify luceneMatchVersion (defaults to LUCENE_CURRENT) and any of the args understood by the specified *Factory class, in the above-describe param format.

    Example:

        -AnalyzerFactory(name:'strip html, fold to ascii, whitespace tokenize, max 10k tokens',
                         positionIncrementGap:100,
                         HTMLStripCharFilter,
                         MappingCharFilter(mapping:'mapping-FoldToASCII.txt'),
                         WhitespaceTokenizer(luceneMatchVersion:LUCENE_43),
                         TokenLimitFilter(maxTokenCount:10000, consumeAllTokens:false))
        [...]
        -NewAnalyzer('strip html, fold to ascii, whitespace tokenize, max 10k tokens')

    AnalyzerFactory will direct analysis component factories to look for resources under the directory specified in the "work.dir" property.

    Constructors

    | Improve this Doc View Source

    AnalyzerFactoryTask(PerfRunData)

    Declaration
    public AnalyzerFactoryTask(PerfRunData runData)
    Parameters
    Type Name Description
    PerfRunData runData

    Properties

    | Improve this Doc View Source

    SupportsParams

    Declaration
    public override bool SupportsParams { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    PerfTask.SupportsParams
    See Also
    SupportsParams

    Methods

    | Improve this Doc View Source

    DoLogic()

    Declaration
    public override int DoLogic()
    Returns
    Type Description
    System.Int32
    Overrides
    PerfTask.DoLogic()
    | Improve this Doc View Source

    GetLineNumber(StreamTokenizer)

    Returns the current line in the algorithm file

    Declaration
    public virtual int GetLineNumber(StreamTokenizer stok)
    Parameters
    Type Name Description
    StreamTokenizer stok
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    LookupAnalysisClass(String, Type)

    This method looks up a class with its fully qualified name (FQN), or a short-name class-simplename, or with a package suffix, assuming "Lucene.Net.Analysis." as the namespace prefix (e.g. "standard.ClassicTokenizerFactory" -> "Lucene.Net.Analysis.Standard.ClassicTokenizerFactory").

    Declaration
    public virtual Type LookupAnalysisClass(string className, Type expectedType)
    Parameters
    Type Name Description
    System.String className

    The namespace qualified name or the short name of the class.

    Type expectedType

    The superclass className is expected to extend.

    Returns
    Type Description
    Type

    The loaded type.

    Remarks

    If className contains a period, the class is first looked up as-is, assuming that it is an FQN. If this fails, lookup is retried after prepending the Lucene analysis package prefix to the class name.

    If className does not contain a period, the analysis SPI *Factory.LookupClass() methods are used to find the class.

    | Improve this Doc View Source

    SetParams(String)

    Sets the params. Analysis component factory names may optionally include the "Factory" suffix.

    Declaration
    public override void SetParams(string params)
    Parameters
    Type Name Description
    System.String params

    analysis pipeline specification: name, (optional) positionIncrementGap, (optional) offsetGap, 0+ CharFilterFactory's, 1 TokenizerFactory, and 0+ TokenFilterFactory's

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