Lucene.Net
3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
|
An Analyzer builds TokenStreams, which analyze text. It thus represents a policy for extracting index terms from text. Typical implementations first build a Tokenizer, which breaks the stream of characters from the Reader into raw Tokens. One or more TokenFilters may then be applied to the output of the Tokenizer. More...
Inherits IDisposable.
Inherited by Lucene.Net.Analysis.AR.ArabicAnalyzer, Lucene.Net.Analysis.BR.BrazilianAnalyzer, Lucene.Net.Analysis.CJK.CJKAnalyzer, Lucene.Net.Analysis.Cn.ChineseAnalyzer, Lucene.Net.Analysis.Cz.CzechAnalyzer, Lucene.Net.Analysis.De.GermanAnalyzer, Lucene.Net.Analysis.El.GreekAnalyzer, Lucene.Net.Analysis.Ext.SingleCharTokenAnalyzer, Lucene.Net.Analysis.Ext.UnaccentedWordAnalyzer, Lucene.Net.Analysis.Fa.PersianAnalyzer, Lucene.Net.Analysis.Fr.FrenchAnalyzer, Lucene.Net.Analysis.KeywordAnalyzer, Lucene.Net.Analysis.Miscellaneous.PatternAnalyzer, Lucene.Net.Analysis.Nl.DutchAnalyzer, Lucene.Net.Analysis.PerFieldAnalyzerWrapper, Lucene.Net.Analysis.Query.QueryAutoStopWordAnalyzer, Lucene.Net.Analysis.Ru.RussianAnalyzer, Lucene.Net.Analysis.Shingle.ShingleAnalyzerWrapper, Lucene.Net.Analysis.SimpleAnalyzer, Lucene.Net.Analysis.Snowball.SnowballAnalyzer, Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net.Analysis.StopAnalyzer, Lucene.Net.Analysis.Th.ThaiAnalyzer, and Lucene.Net.Analysis.WhitespaceAnalyzer.
Public Member Functions | |
abstract TokenStream | TokenStream (String fieldName, System.IO.TextReader reader) |
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility. | |
virtual TokenStream | ReusableTokenStream (String fieldName, System.IO.TextReader reader) |
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance. | |
virtual int | GetPositionIncrementGap (String fieldName) |
Invoked before indexing a Fieldable instance if terms have already been added to that field. This allows custom analyzers to place an automatic position increment gap between Fieldable instances using the same field name. The default value position increment gap is 0. With a 0 position increment gap and the typical default token position increment of 1, all terms in a field, including across Fieldable instances, are in successive positions, allowing exact PhraseQuery matches, for instance, across Fieldable instance boundaries. | |
virtual int | GetOffsetGap (IFieldable field) |
Just like GetPositionIncrementGap, except for Token offsets instead. By default this returns 1 for tokenized fields and, as if the fields were joined with an extra space character, and 0 for un-tokenized fields. This method is only called if the field produced at least one token for indexing. | |
void | Close () |
Frees persistent resources used by this Analyzer | |
virtual void | Dispose () |
Protected Member Functions | |
virtual void | Dispose (bool disposing) |
An Analyzer builds TokenStreams, which analyze text. It thus represents a policy for extracting index terms from text.
Typical implementations first build a Tokenizer, which breaks the stream of characters from the Reader into raw Tokens. One or more TokenFilters may then be applied to the output of the Tokenizer.
Definition at line 32 of file Analyzer.cs.
void Lucene.Net.Analysis.Analyzer.Close | ( | ) |
Frees persistent resources used by this Analyzer
Definition at line 146 of file Analyzer.cs.
|
virtual |
Definition at line 151 of file Analyzer.cs.
|
protectedvirtual |
Definition at line 156 of file Analyzer.cs.
|
virtual |
Just like GetPositionIncrementGap, except for Token offsets instead. By default this returns 1 for tokenized fields and, as if the fields were joined with an extra space character, and 0 for un-tokenized fields. This method is only called if the field produced at least one token for indexing.
field | the field just indexed |
Reimplemented in Lucene.Net.Analysis.PerFieldAnalyzerWrapper.
Definition at line 140 of file Analyzer.cs.
|
virtual |
Invoked before indexing a Fieldable instance if terms have already been added to that field. This allows custom analyzers to place an automatic position increment gap between Fieldable instances using the same field name. The default value position increment gap is 0. With a 0 position increment gap and the typical default token position increment of 1, all terms in a field, including across Fieldable instances, are in successive positions, allowing exact PhraseQuery matches, for instance, across Fieldable instance boundaries.
fieldName | Fieldable name being indexed. |
Definition at line 123 of file Analyzer.cs.
|
virtual |
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.
Definition at line 47 of file Analyzer.cs.
|
pure virtual |
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.