For extra performance you can globally enable the new
{@link #IncrementToken} API using {@link Attribute}s. There will be a
small, but in most cases negligible performance increase by enabling this,
but it only works if all
CopyC#s use the new API and
implement {@link #IncrementToken}. This setting can only be enabled
globally.
This setting only affects
CopyC#s instantiated after this
call. All
CopyC#s already created use the other setting.
All core {@link Analyzer}s are compatible with this setting, if you have
your own
CopyC#s that are also compatible, you should enable
this.
When enabled, tokenization may throw {@link UnsupportedOperationException}
s, if the whole tokenizer chain is not compatible eg one of the
CopyC#s does not implement the new
CopyC# API.
The default is
CopyC#, so there is the fallback to the old API
available.
Namespace: Lucene.Net.Analysis
TokenStream

TokenStream

TokenStream

TokenStream

TokenStream

TokenStream

false
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
C# |
---|
[ObsoleteAttribute("This setting will no longer be needed in Lucene 3.0 as the old API will be removed.")] public static void SetOnlyUseNewAPI( bool onlyUseNewAPI ) |
Visual Basic |
---|
<ObsoleteAttribute("This setting will no longer be needed in Lucene 3.0 as the old API will be removed.")> _ Public Shared Sub SetOnlyUseNewAPI ( _ onlyUseNewAPI As Boolean _ ) |
Visual C++ |
---|
[ObsoleteAttribute(L"This setting will no longer be needed in Lucene 3.0 as the old API will be removed.")] public: static void SetOnlyUseNewAPI( bool onlyUseNewAPI ) |
Parameters
- onlyUseNewAPI
- Type: System..::..Boolean
[Missing <param name="onlyUseNewAPI"/> documentation for "M:Lucene.Net.Analysis.TokenStream.SetOnlyUseNewAPI(System.Boolean)"]