public class LazyDocument
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
LazyDocument.LazyField |
Modifier and Type | Field and Description |
---|---|
private Document |
doc |
private int |
docID |
private java.util.Set<java.lang.String> |
fieldNames |
private java.util.Map<java.lang.Integer,java.util.List<LazyDocument.LazyField>> |
fields |
private IndexReader |
reader |
Constructor and Description |
---|
LazyDocument(IndexReader reader,
int docID) |
Modifier and Type | Method and Description |
---|---|
private void |
fetchRealValues(java.lang.String name,
int fieldNum) |
(package private) Document |
getDocument()
non-private for test only access
|
IndexableField |
getField(FieldInfo fieldInfo)
Creates a StorableField whose value will be lazy loaded if and
when it is used.
|
private final IndexReader reader
private final int docID
private Document doc
private java.util.Map<java.lang.Integer,java.util.List<LazyDocument.LazyField>> fields
private java.util.Set<java.lang.String> fieldNames
public LazyDocument(IndexReader reader, int docID)
public IndexableField getField(FieldInfo fieldInfo)
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.
Document getDocument()
private void fetchRealValues(java.lang.String name, int fieldNum)