Class UnifiedHighlighter.LimitedStoredFieldVisitor
java.lang.Object
org.apache.lucene.index.StoredFieldVisitor
org.apache.lucene.search.uhighlight.UnifiedHighlighter.LimitedStoredFieldVisitor
- Enclosing class:
- UnifiedHighlighter
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
FieldsModifier and TypeFieldDescriptionprotected int
protected final String[]
protected final int
protected CharSequence[]
protected final char
-
Constructor Summary
ConstructorsConstructorDescriptionLimitedStoredFieldVisitor
(String[] fields, char valueSeparator, int maxLength) -
Method Summary
Modifier and TypeMethodDescription(package private) CharSequence[]
(package private) void
init()
needsField
(FieldInfo fieldInfo) Hook before processing a field.void
stringField
(FieldInfo fieldInfo, String value) Process a string field.Methods inherited from class org.apache.lucene.index.StoredFieldVisitor
binaryField, binaryField, doubleField, floatField, intField, longField
-
Field Details
-
fields
-
valueSeparator
protected final char valueSeparator -
maxLength
protected final int maxLength -
values
-
currentField
protected int currentField
-
-
Constructor Details
-
LimitedStoredFieldVisitor
-
-
Method Details
-
init
void init() -
stringField
Description copied from class:StoredFieldVisitor
Process a string field.- Overrides:
stringField
in classStoredFieldVisitor
- Throws:
IOException
-
needsField
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:
IOException
-
getValuesByField
CharSequence[] getValuesByField()
-