Class PatternAnalyzer
Analyzer that uses regex to parse out tokens
public class PatternAnalyzer : Analyzer, IDisposable
- Inheritance
-
AnalyzerPatternAnalyzer
- Implements
- Inherited Members
-
Analyzer.GLOBAL_REUSE_STRATEGYAnalyzer.PER_FIELD_REUSE_STRATEGYAnalyzer.Dispose()Analyzer.Strategy
Constructors
PatternAnalyzer(string, int, bool, CharArraySet?)
Creates a new PatternAnalyzer
public PatternAnalyzer(string format, int regexGroup, bool lowercase = false, CharArraySet? stopWords = null)
Parameters
format
stringThe regex pattern
regexGroup
intThe regex group number to match. -1 to use as a split.
lowercase
boolWhether to lower case the tokens
stopWords
CharArraySetAny stop words that should be included
Methods
CreateComponents(string, TextReader)
Creates the analyzer components
protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader)
Parameters
fieldName
stringThe field name
reader
TextReaderThe TextReader
Returns
- TokenStreamComponents
The Lucene.Net.Analysis.TokenStreamComponents