org.apache.lucene.analysis
Class Analyzer.PerFieldReuseStrategy
java.lang.Object
org.apache.lucene.analysis.Analyzer.ReuseStrategy
org.apache.lucene.analysis.Analyzer.PerFieldReuseStrategy
- All Implemented Interfaces:
- Closeable
- Enclosing class:
- Analyzer
public static class Analyzer.PerFieldReuseStrategy
- extends Analyzer.ReuseStrategy
Implementation of Analyzer.ReuseStrategy
that reuses components per-field by
maintaining a Map of TokenStreamComponent per field name.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Analyzer.PerFieldReuseStrategy
public Analyzer.PerFieldReuseStrategy()
- Creates a new instance, with empty per-thread-per-field values
getReusableComponents
public Analyzer.TokenStreamComponents getReusableComponents(String fieldName)
- Description copied from class:
Analyzer.ReuseStrategy
- Gets the reusable TokenStreamComponents for the field with the given name
- Specified by:
getReusableComponents
in class Analyzer.ReuseStrategy
- Parameters:
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(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 class Analyzer.ReuseStrategy
- Parameters:
fieldName
- Name of the field whose TokenStreamComponents are being setcomponents
- TokenStreamComponents which are to be reused for the field
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.