public class AnalyzerFactoryTask extends PerfTask
name:analyzer-factory-name
Version.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.
Constructor and Description |
---|
AnalyzerFactoryTask(PerfRunData runData) |
Modifier and Type | Method and Description |
---|---|
int |
doLogic()
Perform the task once (ignoring repetitions specification)
Return number of work items done by this task.
|
int |
lineno(StreamTokenizer stok)
Returns the current line in the algorithm file
|
<T> Class<? extends T> |
lookupAnalysisClass(String className,
Class<T> expectedType)
This method looks up a class with its fully qualified name (FQN), or a short-name
class-simplename, or with a package suffix, assuming "org.apache.lucene.analysis."
as the package prefix (e.g.
|
void |
setParams(String params)
Sets the params.
|
boolean |
supportsParams()
Sub classes that support parameters must override this method to return
true.
|
clone, close, getAlgLineNum, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setAlgLineNum, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
public AnalyzerFactoryTask(PerfRunData runData)
public int doLogic()
PerfTask
public void setParams(String params)
public <T> Class<? extends T> lookupAnalysisClass(String className, Class<T> expectedType) throws ClassNotFoundException
className
- The name or the short name of the class.expectedType
- The superclass className is expected to extendClassNotFoundException
- if lookup failspublic boolean supportsParams()
PerfTask
supportsParams
in class PerfTask
public int lineno(StreamTokenizer stok)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.