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 intcurrentFieldprotected java.lang.String[]fieldsprotected intmaxLengthprotected java.lang.CharSequence[]valuesprotected charvalueSeparator
-
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) voidinit()StoredFieldVisitor.StatusneedsField(FieldInfo fieldInfo)Hook before processing a field.voidstringField(FieldInfo fieldInfo, byte[] byteValue)Process a string field; the provided byte[] value is a UTF-8 encoded string value.-
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, byte[] byteValue) throws java.io.IOException
Description copied from class:StoredFieldVisitorProcess a string field; the provided byte[] value is a UTF-8 encoded string value.- Overrides:
stringFieldin classStoredFieldVisitor- Throws:
java.io.IOException
-
needsField
public StoredFieldVisitor.Status needsField(FieldInfo fieldInfo) throws java.io.IOException
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:
java.io.IOException
-
getValuesByField
java.lang.CharSequence[] getValuesByField()
-
-