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.Analyzer
A 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.TokenStreamComponents
createComponents(java.lang.String fieldName)
Creates a the TokenStreamComponents used to analyze the stream.static org.apache.lucene.analysis.CharArraySet
getStopWords()
Returns the set of stop words being used.void
reset()
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:
createComponents
in 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.IOException
Resets the analyzer. This must be manually called between searching and indexing.- Throws:
java.io.IOException
- thrown if there is an error resetting the tokenizer
-
-