[ 
https://issues.apache.org/jira/browse/LUCENE-3638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167125#comment-13167125
 ] 

Shai Erera commented on LUCENE-3638:
------------------------------------

bq. He wants to specify an offset/length into a very large field and only 
retrieve the subslice.

That's indeed what the issue's description says, but there's no evidence to it 
in the patch. And I agree with Robert that in that case, one should store the 
interesting part in a special field.

bq. DocumentStoredFieldsVisitor already supports this in its ctors.

Where? What am I missing? DSFV only takes a list of fieldsToAdd, not 
fieldsToFilter. If you have 20 fields in your index, and you want to load all 
but 2 fields, it may be more convenient to specify these two, and I proposed 
that it can be done in a DSFV extension.

bq. So i would recommend we consider adding some sugar to indexreader:

I think this method is redundant, because one can easily call new DSFV(fields) 
and use the SFV document version. And why do we favor Set<String> over 
String...? :)
                
> IndexReader.document always return a doc with all the stored fields loaded. 
> And this can be slow for the indexed document contain huge fields
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3638
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3638
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/index, core/search
>    Affects Versions: 4.0
>         Environment: 64bit linux java 1.6
>            Reporter: peter chang
>            Priority: Minor
>              Labels: patch
>             Fix For: 4.0
>
>         Attachments: doc.fields.patch
>
>
> when generating digest for some documents with huge fields, it should be 
> unnecessary to load the field but just interesting part of the field with the 
> offset information. but indexreader always return the whole field content. 
> afterward, the customized storedfieldsreader will got a repeated loading

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to