Package org.apache.lucene.misc.document
Class LazyDocument.LazyField
java.lang.Object
org.apache.lucene.misc.document.LazyDocument.LazyField
- All Implemented Interfaces:
IndexableField
- Enclosing class:
- LazyDocument
Lazy-loaded field
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionNon-null if this field has a binary valueIndexableFieldType
describing the properties of this field.private IndexableField
boolean
non-private for test only accessname()
Field nameNon-null if this field has a numeric valueNon-null if this field has a Reader valueNon-null if this field has a string valuetokenStream
(Analyzer analyzer, TokenStream reuse) Creates the TokenStream used for indexing this field.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.index.IndexableField
getCharSequenceValue
-
Field Details
-
name
-
fieldNum
private int fieldNum -
realValue
-
-
Constructor Details
-
LazyField
-
-
Method Details
-
hasBeenLoaded
public boolean hasBeenLoaded()non-private for test only access -
getRealValue
-
name
Description copied from interface:IndexableField
Field name- Specified by:
name
in interfaceIndexableField
-
binaryValue
Description copied from interface:IndexableField
Non-null if this field has a binary value- Specified by:
binaryValue
in interfaceIndexableField
-
stringValue
Description copied from interface:IndexableField
Non-null if this field has a string value- Specified by:
stringValue
in interfaceIndexableField
-
readerValue
Description copied from interface:IndexableField
Non-null if this field has a Reader value- Specified by:
readerValue
in interfaceIndexableField
-
numericValue
Description copied from interface:IndexableField
Non-null if this field has a numeric value- Specified by:
numericValue
in interfaceIndexableField
-
fieldType
Description copied from interface:IndexableField
IndexableFieldType
describing the properties of this field.- Specified by:
fieldType
in interfaceIndexableField
-
tokenStream
Description copied from interface:IndexableField
Creates the TokenStream used for indexing this field. If appropriate, implementations should use the given Analyzer to create the TokenStreams.- Specified by:
tokenStream
in interfaceIndexableField
- Parameters:
analyzer
- Analyzer that should be used to create the TokenStreams fromreuse
- TokenStream for a previous instance of this field name. This allows custom field types (like StringField and NumericField) that do not use the analyzer to still have good performance. Note: the passed-in type may be inappropriate, for example if you mix up different types of Fields for the same field name. So it's the responsibility of the implementation to check.- Returns:
- TokenStream value for indexing the document. Should always return a non-null value if the field is to be indexed
-