public static class Analyzer.PerFieldReuseStrategy extends Analyzer.ReuseStrategy
Analyzer.ReuseStrategy
that reuses components per-field by
maintaining a Map of TokenStreamComponent per field name.Constructor and Description |
---|
Analyzer.PerFieldReuseStrategy()
Creates a new instance, with empty per-thread-per-field values
|
Modifier and Type | Method and Description |
---|---|
Analyzer.TokenStreamComponents |
getReusableComponents(String fieldName)
Gets the reusable TokenStreamComponents for the field with the given name
|
void |
setReusableComponents(String fieldName,
Analyzer.TokenStreamComponents components)
Stores the given TokenStreamComponents as the reusable components for the
field with the give name
|
close, getStoredValue, setStoredValue
public Analyzer.PerFieldReuseStrategy()
public Analyzer.TokenStreamComponents getReusableComponents(String fieldName)
Analyzer.ReuseStrategy
getReusableComponents
in class Analyzer.ReuseStrategy
fieldName
- Name of the field whose reusable TokenStreamComponents
are to be retrievednull
if there was no previous components for the fieldpublic void setReusableComponents(String fieldName, Analyzer.TokenStreamComponents components)
Analyzer.ReuseStrategy
setReusableComponents
in class Analyzer.ReuseStrategy
fieldName
- Name of the field whose TokenStreamComponents are being setcomponents
- TokenStreamComponents which are to be reused for the fieldCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.