[jira] Commented: (LUCENE-2276) Add IndexReader.document(int, Document, FieldSelector)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-2276) Add IndexReader.document(int, Document, FieldSelector)

JIRA jira@apache.org

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

Woody Anderson commented on LUCENE-2276:
----------------------------------------

I could, but i prefer not to.

I'll create another ticket/patch for the improvement that shows why.
That is, if you don't know that you want to re-use a document (the normal case), you can save some GC if you wait to allocate the document until inside the FieldsReader, and you know how many fields etc. you're going to need to accomodate (provided the FieldSelector is null).
So, leaving the allocation until the point of most information is the best idea i think.

if not for this potential gain, i would agree with your comment.

> Add IndexReader.document(int, Document, FieldSelector)
> ------------------------------------------------------
>
>                 Key: LUCENE-2276
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2276
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: Search
>            Reporter: Tim Smith
>         Attachments: LUCENE-2276.patch
>
>
> The Document object passed in would be populated with the fields identified by the FieldSelector for the specified internal document id
> This method would allow reuse of Document objects when retrieving stored fields from the index

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]