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 intprotected final String[]protected final intprotected CharSequence[]protected final char -
Constructor Summary
ConstructorsConstructorDescriptionLimitedStoredFieldVisitor(String[] fields, char valueSeparator, int maxLength) -
Method Summary
Modifier and TypeMethodDescription(package private) CharSequence[](package private) voidinit()needsField(FieldInfo fieldInfo) Hook before processing a field.voidstringField(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:StoredFieldVisitorProcess a string field.- Overrides:
stringFieldin classStoredFieldVisitor- Throws:
IOException
-
needsField
Description copied from class:StoredFieldVisitorHook before processing a field. Before a field is processed, this method is invoked so that subclasses can return aStoredFieldVisitor.Statusrepresenting whether they need that particular field or not, or to stop processing entirely.- Specified by:
needsFieldin classStoredFieldVisitor- Throws:
IOException
-
getValuesByField
CharSequence[] getValuesByField()
-