java.lang.Object
org.apache.lucene.misc.document.LazyDocument
Defers actually loading a field's value until you ask for it. You must not use the returned Field
instances after the provided reader has been closed.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Document
private final int
private Map
<Integer, List<LazyDocument.LazyField>> private final IndexReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
fetchRealValues
(String name, int fieldNum) (package private) Document
non-private for test only accessCreates a StorableField whose value will be lazy loaded if and when it is used.
-
Field Details
-
reader
-
docID
private final int docID -
doc
-
fields
-
fieldNames
-
-
Constructor Details
-
LazyDocument
-
-
Method Details
-
getField
Creates a StorableField whose value will be lazy loaded if and when it is used.NOTE: This method must be called once for each value of the field name specified in sequence that the values exist. This method may not be used to generate multiple, lazy, StorableField instances referring to the same underlying StorableField instance.
The lazy loading of field values from all instances of StorableField objects returned by this method are all backed by a single StoredDocument per LazyDocument instance.
-
getDocument
Document getDocument()non-private for test only access -
fetchRealValues
-