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 Thu, 27 Apr 2006 19:10:40 GMT
    [ ] 

Chuck Williams commented on LUCENE-558:

545 is certainly more general and could handle all the cases.  I looked at it briefly before
doing this version and was concerned by the pervasiveness of its changes for the simple use
case of loading selected fields.  It seemed it might break my current code (e.g., elimination
of IndexReader.document(int n) and Fieldable as new type of object on Documents).  I thought
a version that had no effect other than adding the new functionality would be safer and might
be useful to others

I just took a closer look at 545.   It seems like a good implementation.  FYI, I can't find
the definitions of FieldSelector, SetBaseFieldSelector or LoadFirstFielSelector? I would suggest
leaving IndexReader.document(int) -- there does not a appear to be a reason to take it out.
 Although it is also not difficult to add the extra null parameter, backward compatibility
is a virtue.  Presumably it would be easy to write a field selector that takes the list of
fields to load (loading no others) and therefore get the API I need (for the cost of one extra

> 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