Class TrimFilter
Trims leading and trailing whitespace from Tokens in the stream.
As of Lucene 4.4, this filter does not support updateOffsets=true anymore as it can lead to broken token streams.
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Analysis.Miscellaneous
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public sealed class TrimFilter : TokenFilter, IDisposable
Constructors
| Improve this Doc View SourceTrimFilter(LuceneVersion, TokenStream)
Create a new TrimFilter on top of in
.
Declaration
public TrimFilter(LuceneVersion version, TokenStream in)
Parameters
Type | Name | Description |
---|---|---|
LuceneVersion | version | |
TokenStream | in |
TrimFilter(LuceneVersion, TokenStream, Boolean)
Create a new TrimFilter.
Declaration
[Obsolete("Offset updates are not supported anymore as of Lucene 4.4.")]
public TrimFilter(LuceneVersion version, TokenStream in, bool updateOffsets)
Parameters
Type | Name | Description |
---|---|---|
LuceneVersion | version | the Lucene match version |
TokenStream | in | the stream to consume |
System.Boolean | updateOffsets | whether to update offsets |
Methods
| Improve this Doc View SourceIncrementToken()
Declaration
public override bool IncrementToken()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Implements
System.IDisposable