Table of Contents

Class PatternAnalyzer

Namespace
Examine.Lucene.Analyzers
Assembly
Examine.Lucene.dll

Analyzer that uses regex to parse out tokens

public class PatternAnalyzer : Analyzer, IDisposable
Inheritance
Analyzer
PatternAnalyzer
Implements
Inherited Members
Analyzer.GLOBAL_REUSE_STRATEGY
Analyzer.PER_FIELD_REUSE_STRATEGY
Analyzer.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 string

The regex pattern

regexGroup int

The regex group number to match. -1 to use as a split.

lowercase bool

Whether to lower case the tokens

stopWords CharArraySet

Any stop words that should be included

Methods

CreateComponents(string, TextReader)

Creates the analyzer components

protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader)

Parameters

fieldName string

The field name

reader TextReader

The TextReader

Returns

TokenStreamComponents

The Lucene.Net.Analysis.TokenStreamComponents