Class UnifiedHighlighter.LimitedStoredFieldVisitor
- java.lang.Object
-
- org.apache.lucene.index.StoredFieldVisitor
-
- org.apache.lucene.search.uhighlight.UnifiedHighlighter.LimitedStoredFieldVisitor
-
- Enclosing class:
- UnifiedHighlighter
protected static class UnifiedHighlighter.LimitedStoredFieldVisitor extends StoredFieldVisitor
Fetches stored fields for highlighting. Uses a multi-val separator char and honors a max length to retrieve.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.StoredFieldVisitor
StoredFieldVisitor.Status
-
-
Field Summary
Fields Modifier and Type Field Description protected int
currentField
protected java.lang.String[]
fields
protected int
maxLength
protected java.lang.CharSequence[]
values
protected char
valueSeparator
-
Constructor Summary
Constructors Constructor Description LimitedStoredFieldVisitor(java.lang.String[] fields, char valueSeparator, int maxLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.CharSequence[]
getValuesByField()
(package private) void
init()
StoredFieldVisitor.Status
needsField(FieldInfo fieldInfo)
Hook before processing a field.void
stringField(FieldInfo fieldInfo, java.lang.String value)
Process a string field.-
Methods inherited from class org.apache.lucene.index.StoredFieldVisitor
binaryField, doubleField, floatField, intField, longField
-
-
-
-
Method Detail
-
init
void init()
-
stringField
public void stringField(FieldInfo fieldInfo, java.lang.String value) throws java.io.IOException
Description copied from class:StoredFieldVisitor
Process a string field.- Overrides:
stringField
in classStoredFieldVisitor
- Throws:
java.io.IOException
-
needsField
public StoredFieldVisitor.Status needsField(FieldInfo fieldInfo) throws java.io.IOException
Description copied from class:StoredFieldVisitor
Hook before processing a field. Before a field is processed, this method is invoked so that subclasses can return aStoredFieldVisitor.Status
representing whether they need that particular field or not, or to stop processing entirely.- Specified by:
needsField
in classStoredFieldVisitor
- Throws:
java.io.IOException
-
getValuesByField
java.lang.CharSequence[] getValuesByField()
-
-