Package org.apache.lucene.tests.analysis
Class MockPayloadAnalyzer
- java.lang.Object
-
- org.apache.lucene.analysis.Analyzer
-
- org.apache.lucene.tests.analysis.MockPayloadAnalyzer
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class MockPayloadAnalyzer extends Analyzer
Wraps a whitespace tokenizer with a filter that sets the first token, and odd tokens to posinc=1, and all others to 0, encoding the position as pos: XXX in the payload.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer
Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.analysis.Analyzer
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description MockPayloadAnalyzer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Analyzer.TokenStreamComponents
createComponents(String fieldName)
-
Methods inherited from class org.apache.lucene.analysis.Analyzer
attributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, initReader, initReaderForNormalization, normalize, normalize, tokenStream, tokenStream
-
-
-
-
Method Detail
-
createComponents
public Analyzer.TokenStreamComponents createComponents(String fieldName)
- Specified by:
createComponents
in classAnalyzer
-
-