Module org.apache.lucene.core
Package org.apache.lucene.analysis
Class DelegatingAnalyzerWrapper.DelegatingReuseStrategy
java.lang.Object
org.apache.lucene.analysis.Analyzer.ReuseStrategy
org.apache.lucene.analysis.DelegatingAnalyzerWrapper.DelegatingReuseStrategy
- Enclosing class:
DelegatingAnalyzerWrapper
private static final class DelegatingAnalyzerWrapper.DelegatingReuseStrategy
extends Analyzer.ReuseStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Analyzer.ReuseStrategy
(package private) DelegatingAnalyzerWrapper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetReusableComponents
(Analyzer analyzer, String fieldName) Gets the reusable TokenStreamComponents for the field with the given name.void
setReusableComponents
(Analyzer analyzer, String fieldName, Analyzer.TokenStreamComponents components) Stores the given TokenStreamComponents as the reusable components for the field with the give name.Methods inherited from class org.apache.lucene.analysis.Analyzer.ReuseStrategy
getStoredValue, setStoredValue
-
Field Details
-
wrapper
DelegatingAnalyzerWrapper wrapper -
fallbackStrategy
-
-
Constructor Details
-
DelegatingReuseStrategy
DelegatingReuseStrategy(Analyzer.ReuseStrategy fallbackStrategy)
-
-
Method Details
-
getReusableComponents
Description copied from class:Analyzer.ReuseStrategy
Gets the reusable TokenStreamComponents for the field with the given name.- Specified by:
getReusableComponents
in classAnalyzer.ReuseStrategy
- Parameters:
analyzer
- Analyzer from which to get the reused components. UseAnalyzer.ReuseStrategy.getStoredValue(Analyzer)
andAnalyzer.ReuseStrategy.setStoredValue(Analyzer, Object)
to access the data on the Analyzer.fieldName
- Name of the field whose reusable TokenStreamComponents are to be retrieved- Returns:
- Reusable TokenStreamComponents for the field, or
null
if there was no previous components for the field
-
setReusableComponents
public void setReusableComponents(Analyzer analyzer, String fieldName, Analyzer.TokenStreamComponents components) Description copied from class:Analyzer.ReuseStrategy
Stores the given TokenStreamComponents as the reusable components for the field with the give name.- Specified by:
setReusableComponents
in classAnalyzer.ReuseStrategy
- Parameters:
fieldName
- Name of the field whose TokenStreamComponents are being setcomponents
- TokenStreamComponents which are to be reused for the field
-