lux.index.analysis
Class WhitespaceGapAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
lux.index.analysis.WhitespaceGapAnalyzer
- All Implemented Interfaces:
- Closeable
public final class WhitespaceGapAnalyzer
- extends org.apache.lucene.analysis.Analyzer
An Analyzer that uses WhitespaceTokenizer, and inserts
position gaps of 100 between multiple values to inhibit phrase and span matches
across values.
| Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer |
org.apache.lucene.analysis.Analyzer.GlobalReuseStrategy, org.apache.lucene.analysis.Analyzer.PerFieldReuseStrategy, org.apache.lucene.analysis.Analyzer.ReuseStrategy, org.apache.lucene.analysis.Analyzer.TokenStreamComponents |
| Methods inherited from class org.apache.lucene.analysis.Analyzer |
close, getOffsetGap, initReader, tokenStream |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WhitespaceGapAnalyzer
public WhitespaceGapAnalyzer()
createComponents
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String fieldName,
Reader reader)
- Specified by:
createComponents in class org.apache.lucene.analysis.Analyzer
getPositionIncrementGap
public int getPositionIncrementGap(String field)
- Overrides:
getPositionIncrementGap in class org.apache.lucene.analysis.Analyzer
- Returns:
- 100 - note this is tied to Surround QueryParser's maximum distance of 99.
Copyright © 2013. All Rights Reserved.