Class SearchFieldAnalyzer
- java.lang.Object
-
- org.apache.lucene.analysis.Analyzer
-
- org.owasp.dependencycheck.data.lucene.SearchFieldAnalyzer
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class SearchFieldAnalyzer extends org.apache.lucene.analysis.AnalyzerA Lucene field analyzer used to analyzer queries against the CPE data.- Author:
- Jeremy Long
-
-
Constructor Summary
Constructors Constructor Description SearchFieldAnalyzer()Constructs a new SearchFieldAnalyzer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.lucene.analysis.Analyzer.TokenStreamComponentscreateComponents(java.lang.String fieldName)Creates a the TokenStreamComponents used to analyze the stream.static org.apache.lucene.analysis.CharArraySetgetStopWords()Returns the set of stop words being used.voidreset()Resets the analyzer.
-
-
-
Method Detail
-
getStopWords
public static org.apache.lucene.analysis.CharArraySet getStopWords()
Returns the set of stop words being used.- Returns:
- the set of stop words being used
-
createComponents
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(java.lang.String fieldName)
Creates a the TokenStreamComponents used to analyze the stream.- Specified by:
createComponentsin classorg.apache.lucene.analysis.Analyzer- Parameters:
fieldName- the field that this lucene analyzer will process- Returns:
- the token stream filter chain
-
reset
public void reset() throws java.io.IOExceptionResets the analyzer. This must be manually called between searching and indexing.- Throws:
java.io.IOException- thrown if there is an error resetting the tokenizer
-
-