|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.benchmark.byTask.tasks.PerfTask
org.apache.lucene.benchmark.byTask.tasks.AnalyzerFactoryTask
public class AnalyzerFactoryTask
Analyzer factory construction task. The name given to the constructed factory may be given to NewAnalyzerTask, which will call AnalyzerFactory.create(). 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:
name:analyzer-factory-nameVersion.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.
| Field Summary |
|---|
| Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask |
|---|
logStep, NEW_LINE, params, stopNow |
| Constructor Summary | |
|---|---|
AnalyzerFactoryTask(PerfRunData runData)
|
|
| Method Summary | ||
|---|---|---|
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 |
|
|
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. |
|
| Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask |
|---|
clone, close, getAlgLineNum, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setAlgLineNum, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AnalyzerFactoryTask(PerfRunData runData)
| Method Detail |
|---|
public int doLogic()
PerfTask
doLogic in class PerfTaskpublic void setParams(String params)
setParams in class PerfTaskparams - analysis pipeline specification: name, (optional) positionIncrementGap,
(optional) offsetGap, 0+ CharFilterFactory's, 1 TokenizerFactory,
and 0+ TokenFilterFactory's
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 extend
ClassNotFoundException - if lookup failspublic boolean supportsParams()
PerfTask
supportsParams in class PerfTaskpublic int lineno(StreamTokenizer stok)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||