org.dspace.search
Class DSAnalyzer

java.lang.Object
  extended by org.apache.lucene.analysis.Analyzer
      extended by org.apache.lucene.analysis.ReusableAnalyzerBase
          extended by org.apache.lucene.analysis.StopwordAnalyzerBase
              extended by 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 Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents
 
Field Summary
protected  org.apache.lucene.util.Version matchVersion
           
protected static String[] STOP_WORDS
           
protected  Set stopSet
           
 
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
stopwords
 
Constructor Summary
DSAnalyzer(org.apache.lucene.util.Version matchVersion)
          Builds an analyzer
 
Method Summary
protected  org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
           
 int getPositionIncrementGap(String fieldName)
           
 
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, 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
 

Field Detail

matchVersion

protected final org.apache.lucene.util.Version matchVersion

STOP_WORDS

protected static final String[] STOP_WORDS

stopSet

protected final Set stopSet
Constructor Detail

DSAnalyzer

public DSAnalyzer(org.apache.lucene.util.Version matchVersion)
Builds an analyzer

Parameters:
matchVersion - Lucene version to match
Method Detail

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 © 2012 DuraSpace. All Rights Reserved.