Class Analyzer.GlobalReuseStrategy
Implementation of ReuseStrategy that reuses the same components for every field.
Inherited Members
Namespace: Lucene.Net.Analysis
Assembly: Lucene.Net.dll
Syntax
[Obsolete("this implementation class will be hidden in Lucene 5.0. Use Analyzer.GLOBAL_REUSE_STRATEGY instead!")]
public sealed class Analyzer.GlobalReuseStrategy : ReuseStrategy
Constructors
GlobalReuseStrategy()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Declaration
[Obsolete("Don't create instances of this class, use Analyzer.GLOBAL_REUSE_STRATEGY")]
public GlobalReuseStrategy()
Methods
GetReusableComponents(Analyzer, string)
Gets the reusable TokenStreamComponents for the field with the given name.
Declaration
public override TokenStreamComponents GetReusableComponents(Analyzer analyzer, string fieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| Analyzer | analyzer | Analyzer from which to get the reused components. Use GetStoredValue(Analyzer) and SetStoredValue(Analyzer, object) to access the data on the Analyzer. |
| string | fieldName | Name of the field whose reusable TokenStreamComponents are to be retrieved |
Returns
| Type | Description |
|---|---|
| TokenStreamComponents | Reusable TokenStreamComponents for the field, or |
Overrides
SetReusableComponents(Analyzer, string, TokenStreamComponents)
Stores the given TokenStreamComponents as the reusable components for the field with the give name.
Declaration
public override void SetReusableComponents(Analyzer analyzer, string fieldName, TokenStreamComponents components)
Parameters
| Type | Name | Description |
|---|---|---|
| Analyzer | analyzer | Analyzer |
| string | fieldName | Name of the field whose TokenStreamComponents are being set |
| TokenStreamComponents | components | TokenStreamComponents which are to be reused for the field |