Lazy loading is handled through the FieldSelector interface on
IndexReader.doc() and some variations. There is nothing special that
need be done during indexing to mark a field as lazy. The isLazy
method merely lets you know later, after loading a Document, if the
field is, indeed, lazy. One caveat, lazy fields become undefined if
the underlying IndexReader is closed before accessing the field.
Once a lazy field is loaded, however, this is no longer an issue, as
the field value stays in memory.
-Grant
On Apr 4, 2007, at 8:56 AM, jafarim wrote:
Hi
I wonder why there is not setter method for the "lazy" member
variable in
Field class. Does that mean the propoerty is nominal and setting it
does not
have any effect, or am I missing some point?
Any way, is there any way to tell lucene that a field is to be lazy-
loaded,
from the very beginning of field construction?
--jaf
--------------------------
Grant Ingersoll
Center for Natural Language Processing
http://www.cnlp.org
Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/
LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]