Module org.apache.lucene.core
Package org.apache.lucene.index
Class SortingStoredFieldsConsumer.CopyVisitor
- java.lang.Object
-
- org.apache.lucene.index.StoredFieldVisitor
-
- org.apache.lucene.index.SortingStoredFieldsConsumer.CopyVisitor
-
- Enclosing class:
- SortingStoredFieldsConsumer
private static class SortingStoredFieldsConsumer.CopyVisitor extends StoredFieldVisitor
A visitor that copies every field it sees in the providedStoredFieldsWriter
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.StoredFieldVisitor
StoredFieldVisitor.Status
-
-
Field Summary
Fields Modifier and Type Field Description (package private) StoredFieldsWriter
writer
-
Constructor Summary
Constructors Constructor Description CopyVisitor(StoredFieldsWriter writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
binaryField(FieldInfo fieldInfo, byte[] value)
Process a binary field.void
binaryField(FieldInfo fieldInfo, DataInput value, int length)
Expert: Process a binary field directly from theDataInput
.void
doubleField(FieldInfo fieldInfo, double value)
Process a double numeric field.void
floatField(FieldInfo fieldInfo, float value)
Process a float numeric field.void
intField(FieldInfo fieldInfo, int value)
Process a int numeric field.void
longField(FieldInfo fieldInfo, long value)
Process a long numeric field.StoredFieldVisitor.Status
needsField(FieldInfo fieldInfo)
Hook before processing a field.void
stringField(FieldInfo fieldInfo, java.lang.String value)
Process a string field.
-
-
-
Field Detail
-
writer
final StoredFieldsWriter writer
-
-
Constructor Detail
-
CopyVisitor
CopyVisitor(StoredFieldsWriter writer)
-
-
Method Detail
-
binaryField
public void binaryField(FieldInfo fieldInfo, DataInput value, int length) throws java.io.IOException
Description copied from class:StoredFieldVisitor
Expert: Process a binary field directly from theDataInput
. Implementors of this method must readlength
bytes from the givenDataInput
. The default implementation reads all byes in a newly created byte array and callsStoredFieldVisitor.binaryField(FieldInfo, byte[])
.- Overrides:
binaryField
in classStoredFieldVisitor
value
- newly allocated byte array with the binary contents.- Throws:
java.io.IOException
-
binaryField
public void binaryField(FieldInfo fieldInfo, byte[] value) throws java.io.IOException
Description copied from class:StoredFieldVisitor
Process a binary field.- Overrides:
binaryField
in classStoredFieldVisitor
value
- newly allocated byte array with the binary contents.- Throws:
java.io.IOException
-
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
-
intField
public void intField(FieldInfo fieldInfo, int value) throws java.io.IOException
Description copied from class:StoredFieldVisitor
Process a int numeric field.- Overrides:
intField
in classStoredFieldVisitor
- Throws:
java.io.IOException
-
longField
public void longField(FieldInfo fieldInfo, long value) throws java.io.IOException
Description copied from class:StoredFieldVisitor
Process a long numeric field.- Overrides:
longField
in classStoredFieldVisitor
- Throws:
java.io.IOException
-
floatField
public void floatField(FieldInfo fieldInfo, float value) throws java.io.IOException
Description copied from class:StoredFieldVisitor
Process a float numeric field.- Overrides:
floatField
in classStoredFieldVisitor
- Throws:
java.io.IOException
-
doubleField
public void doubleField(FieldInfo fieldInfo, double value) throws java.io.IOException
Description copied from class:StoredFieldVisitor
Process a double numeric field.- Overrides:
doubleField
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
-
-