lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Williams (JIRA)" <>
Subject [jira] Commented: (LUCENE-558) Selective field loading
Date Fri, 28 Apr 2006 00:34:38 GMT
    [ ] 

Chuck Williams commented on LUCENE-558:

There is one potentially important benefit of this approach over LUCENE-545.  By having the
narrower more concrete API (list of fields to load vs. general selector for a variety of loading
modes), it is possible to introduce optimizations into readers.

The once case where this is done is with ParallelReader.  This patch only accesses the reader(s)
that contain the field(s) to be loaded, while LUCENE-545 reads the fields from all readers.
 That can be a significant performance difference, although if using ParallelReaders the application
should be able to arrange for this optimization itself.

By extending the FieldSelector interface a little, the optimization could be maintained in
the more general LUCENE-545.

> Selective field loading
> -----------------------
>          Key: LUCENE-558
>          URL:
>      Project: Lucene - Java
>         Type: New Feature

>   Components: Index
>     Versions: 2.0
>  Environment: All
>     Reporter: Chuck Williams
>  Attachments: LuceneTrunk.patch
> Provides a new api, IndexReader.document(int doc, String[] fields).  A document containing
only the specified fields is created.  The other fields of the document are not loaded, although
unfortunately uncompressed strings still have to be scanned because the length information
in the index is for UTF-8 encoded chars and not bytes.  This is useful for applications that
need quick access to a small subset of the fields.  It can be used in conjunction with or
for some uses instead of ParallelReader.
> This is a much smaller change for a simpler use case than Lucene-545.  No existing API's
are affected.
> All the tests pass and new tests are added to verify the feature.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message