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 valueIndexableFieldTypedescribing the properties of this field.private IndexableFieldbooleannon-private for test only accessDescribes how this field should be inverted.name()Field nameNon-null if this field has a numeric valueNon-null if this field has a Reader valueStored value.Non-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, waitMethods 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:IndexableFieldField name- Specified by:
namein interfaceIndexableField
-
binaryValue
Description copied from interface:IndexableFieldNon-null if this field has a binary value- Specified by:
binaryValuein interfaceIndexableField
-
stringValue
Description copied from interface:IndexableFieldNon-null if this field has a string value- Specified by:
stringValuein interfaceIndexableField
-
readerValue
Description copied from interface:IndexableFieldNon-null if this field has a Reader value- Specified by:
readerValuein interfaceIndexableField
-
numericValue
Description copied from interface:IndexableFieldNon-null if this field has a numeric value- Specified by:
numericValuein interfaceIndexableField
-
fieldType
Description copied from interface:IndexableFieldIndexableFieldTypedescribing the properties of this field.- Specified by:
fieldTypein interfaceIndexableField
-
tokenStream
Description copied from interface:IndexableFieldCreates the TokenStream used for indexing this field. If appropriate, implementations should use the given Analyzer to create the TokenStreams.- Specified by:
tokenStreamin 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
-
storedValue
Description copied from interface:IndexableFieldStored value. This method is called to populate stored fields and must return a non-null value if the field stored.- Specified by:
storedValuein interfaceIndexableField
-
invertableType
Description copied from interface:IndexableFieldDescribes how this field should be inverted. This must return a non-null value if the field indexes terms and postings.- Specified by:
invertableTypein interfaceIndexableField
-