Class Analyzer.PerFieldReuseStrategy
Implementation of ReuseStrategy that reuses components per-field by maintaining a Map of TokenStreamComponents per field name.
Inherited Members
Namespace: Lucene.Net.Analysis
Assembly: Lucene.Net.dll
Syntax
[Obsolete("this implementation class will be hidden in Lucene 5.0. Use Analyzer.PER_FIELD_REUSE_STRATEGY instead!")]
public class Analyzer.PerFieldReuseStrategy : ReuseStrategy
Constructors
PerFieldReuseStrategy()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Declaration
[Obsolete("Don't create instances of this class, use Analyzer.PER_FIELD_REUSE_STRATEGY")]
public PerFieldReuseStrategy()
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 |