On 3/31/06, Yonik Seeley <[EMAIL PROTECTED]> wrote:
> >         <https://issues.apache.org:443/jira/browse/LUCENE-509>
>
> Yes, I'd personally find a way to retrieve just fields x,y, and z more
> useful than lazy loading.

Thinking a little more, it would be nice if the field reading API was
opened up a little more so that multiple things could be done... even
construct different field/document objects (say a document
implementation that indexed the fields, etc).
That could be used to implement either lazy field loading, or loading
of specific fields.

The lazy loading alone doesn't really address LUCENE-509

I was thinking something along the lines of

// an IndexReader would call FieldReader methods for each
abstract class FieldReader {
  boolean readField(int fieldnum, String fieldName);  // users return
true if this field should be read.
  boolean stringField(int fieldnum, byte[] utf8);   // returns true to
keep reading next field
    OR
  boolean stringField(int fieldnum, String str);   // returns true to
keep reading next field
  boolean binaryField(int fieldnum, byte[] data);  // returns true to
keep reading next field
}

class IndexReader {
  // expert level API
  void readFields(int doc, FieldReader reader);
}

Just brainstorming so far...

-Yonik
http://incubator.apache.org/solr Solr, The Open Source Lucene Search Server

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

Reply via email to