I prefer option #4 myself. Also note that a similar issue with patches exists within JIRA:

        <https://issues.apache.org:443/jira/browse/LUCENE-509>

Erik


On Mar 31, 2006, at 7:21 AM, Grant Ingersoll wrote:

OK, how about a vote on this.

I see several ways of implementing the front end to this:

1. Declarative: On construction of a Document, you declare the Field to be Lazy.

2. Implicit:  All fields are Lazy

3. Size of Field. Pass into IndexReader.document() the size of the field above which it will be lazily loaded. A default size can also be used.

4. By Field name. Pass in the names of the Fields that you want loaded lazily.

Thanks,
Grant

Doug Cutting wrote:
Grant Ingersoll wrote:
My main concern is the semantics of the fieldsStream and whether that would be closed behind the back of the LazyField implementation. My understanding is that as long as the IndexReader is open, this stream should also be open. Is that correct? What am I forgetting about?

You need to make sure that access to the stream is synchronized, so that one thread doesn't move the file pointer while someone else is reading. You could use a cloned stream in a ThreadLocal to avoid contention.

Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--

Grant Ingersoll Sr. Software Engineer Center for Natural Language Processing Syracuse University School of Information Studies 335 Hinds Hall Syracuse, NY 13244
http://www.cnlp.org Voice:  315-443-5484 Fax: 315-443-6886

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to