Class AnalyzerFactoryTask
Analyzer factory construction task. The name given to the constructed factory may be given to NewAnalyzerTask, which will call Create().
Implements
Inherited Members
Namespace: Lucene.Net.Benchmarks.ByTask.Tasks
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class AnalyzerFactoryTask : PerfTask, IDisposable
  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) 
 - Required: 
 - zero or more CharFilterFactory's, followed by
 - exactly one TokenizerFactory, followed by
 - 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 SourceAnalyzerFactoryTask(PerfRunData)
Declaration
public AnalyzerFactoryTask(PerfRunData runData)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PerfRunData | runData | 
Properties
| Improve this Doc View SourceSupportsParams
Declaration
public override bool SupportsParams { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Overrides
See Also
Methods
| Improve this Doc View SourceDoLogic()
Declaration
public override int DoLogic()
  Returns
| Type | Description | 
|---|---|
| System.Int32 | 
Overrides
| Improve this Doc View SourceGetLineNumber(StreamTokenizer)
Returns the current line in the algorithm file
Declaration
public virtual int GetLineNumber(StreamTokenizer stok)
  Parameters
| Type | Name | Description | 
|---|---|---|
| J2N.IO.StreamTokenizer | stok | 
Returns
| Type | Description | 
|---|---|
| System.Int32 | 
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.  | 
      
| System.Type | expectedType | The superclass   | 
      
Returns
| Type | Description | 
|---|---|
| System.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.
Exceptions
| Type | Condition | 
|---|---|
| System.TypeLoadException | If lookup fails.  | 
      
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  |