org.dspace.search
Class DSAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.ReusableAnalyzerBase
org.apache.lucene.analysis.StopwordAnalyzerBase
org.dspace.search.DSAnalyzer
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- DSNonStemmingAnalyzer
public class DSAnalyzer
- extends org.apache.lucene.analysis.StopwordAnalyzerBase
Custom Lucene Analyzer that combines the standard filter, lowercase filter,
stemming and stopword filters.
| Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase |
org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents |
| Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase |
stopwords |
|
Constructor Summary |
DSAnalyzer(org.apache.lucene.util.Version matchVersion)
Builds an analyzer |
| Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase |
getStopwordSet, loadStopwordSet |
| Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase |
initReader, reusableTokenStream, tokenStream |
| Methods inherited from class org.apache.lucene.analysis.Analyzer |
close, getOffsetGap, getPreviousTokenStream, setPreviousTokenStream |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
matchVersion
protected final org.apache.lucene.util.Version matchVersion
STOP_WORDS
protected static final String[] STOP_WORDS
stopSet
protected final Set stopSet
DSAnalyzer
public DSAnalyzer(org.apache.lucene.util.Version matchVersion)
- Builds an analyzer
- Parameters:
matchVersion - Lucene version to match
createComponents
protected org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
Reader reader)
- Specified by:
createComponents in class org.apache.lucene.analysis.ReusableAnalyzerBase
getPositionIncrementGap
public int getPositionIncrementGap(String fieldName)
- Overrides:
getPositionIncrementGap in class org.apache.lucene.analysis.Analyzer
Copyright © 2011 DuraSpace. All Rights Reserved.