Class TypeTokenFilter
Removes tokens whose types appear in a set of blocked types from a token stream.
Inheritance
System.Object
Lucene.Net.Util.AttributeSource
Lucene.Net.Analysis.TokenStream
Lucene.Net.Analysis.TokenFilter
TypeTokenFilter
Implements
System.IDisposable
Inherited Members
Lucene.Net.Analysis.TokenFilter.m_input
Lucene.Net.Analysis.TokenStream.Dispose()
Lucene.Net.Util.AttributeSource.GetAttributeFactory()
Lucene.Net.Util.AttributeSource.GetAttributeClassesEnumerator()
Lucene.Net.Util.AttributeSource.GetAttributeImplsEnumerator()
Lucene.Net.Util.AttributeSource.AddAttributeImpl(Lucene.Net.Util.Attribute)
Lucene.Net.Util.AttributeSource.AddAttribute<T>()
Lucene.Net.Util.AttributeSource.HasAttributes
Lucene.Net.Util.AttributeSource.HasAttribute<T>()
Lucene.Net.Util.AttributeSource.GetAttribute<T>()
Lucene.Net.Util.AttributeSource.ClearAttributes()
Lucene.Net.Util.AttributeSource.CaptureState()
Lucene.Net.Util.AttributeSource.RestoreState(Lucene.Net.Util.AttributeSource.State)
Lucene.Net.Util.AttributeSource.GetHashCode()
Lucene.Net.Util.AttributeSource.ReflectWith(Lucene.Net.Util.IAttributeReflector)
Lucene.Net.Util.AttributeSource.CloneAttributes()
Lucene.Net.Util.AttributeSource.CopyTo(Lucene.Net.Util.AttributeSource)
Lucene.Net.Util.AttributeSource.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Analysis.Core
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public sealed class TypeTokenFilter : FilteringTokenFilter, IDisposable
Constructors
| Improve this Doc View SourceTypeTokenFilter(LuceneVersion, TokenStream, ICollection<String>)
Create a new TypeTokenFilter that filters tokens out (useWhiteList=false).
Declaration
public TypeTokenFilter(LuceneVersion version, TokenStream input, ICollection<string> stopTypes)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Util.LuceneVersion | version | |
Lucene.Net.Analysis.TokenStream | input | |
System.Collections.Generic.ICollection<System.String> | stopTypes |
See Also
| Improve this Doc View SourceTypeTokenFilter(LuceneVersion, TokenStream, ICollection<String>, Boolean)
Create a new TypeTokenFilter.
Declaration
public TypeTokenFilter(LuceneVersion version, TokenStream input, ICollection<string> stopTypes, bool useWhiteList)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Util.LuceneVersion | version | the Lucene.Net.Util.LuceneVersion match version |
Lucene.Net.Analysis.TokenStream | input | the Lucene.Net.Analysis.TokenStream to consume |
System.Collections.Generic.ICollection<System.String> | stopTypes | the types to filter |
System.Boolean | useWhiteList | if true, then tokens whose type is in |
TypeTokenFilter(LuceneVersion, Boolean, TokenStream, ICollection<String>)
Declaration
[Obsolete("enablePositionIncrements=false is not supported anymore as of Lucene 4.4.")]
public TypeTokenFilter(LuceneVersion version, bool enablePositionIncrements, TokenStream input, ICollection<string> stopTypes)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Util.LuceneVersion | version | |
System.Boolean | enablePositionIncrements | |
Lucene.Net.Analysis.TokenStream | input | |
System.Collections.Generic.ICollection<System.String> | stopTypes |
TypeTokenFilter(LuceneVersion, Boolean, TokenStream, ICollection<String>, Boolean)
Declaration
[Obsolete("enablePositionIncrements=false is not supported anymore as of Lucene 4.4.")]
public TypeTokenFilter(LuceneVersion version, bool enablePositionIncrements, TokenStream input, ICollection<string> stopTypes, bool useWhiteList)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Util.LuceneVersion | version | |
System.Boolean | enablePositionIncrements | |
Lucene.Net.Analysis.TokenStream | input | |
System.Collections.Generic.ICollection<System.String> | stopTypes | |
System.Boolean | useWhiteList |
Methods
| Improve this Doc View SourceAccept()
By default accept the token if its type is not a stop type. When the Lucene.Net.Analysis.Core.TypeTokenFilter.useWhiteList parameter is set to true then accept the token if its type is contained in the Lucene.Net.Analysis.Core.TypeTokenFilter.stopTypes
Declaration
protected override bool Accept()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Implements
System.IDisposable