lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <ysee...@gmail.com>
Subject Re: Lazy Field Loading
Date Tue, 04 Apr 2006 20:16:25 GMT
On 3/31/06, Yonik Seeley <yseeley@gmail.com> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message