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 alls use the new API and
implement {@link #IncrementToken}. This setting can only be enabled
globally.
This setting only affects s instantiated after this
call. All s already created use the other setting.
All core {@link Analyzer}s are compatible with this setting, if you have
your own 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
s does not implement the new API.
The default is , so there is the fallback to the old API
available.
Namespace: Lucene.Net.AnalysisCopyC#
TokenStream
CopyC#
TokenStream
CopyC#
TokenStream
CopyC#
TokenStream
CopyC#
TokenStream
CopyC#
TokenStream
CopyC#
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)"]