[
https://issues.apache.org/jira/browse/LUCENE-2276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888323#action_12888323
]
Tim Smith commented on LUCENE-2276:
-----------------------------------
instead of doing the following everywhere:
{code}
final Document doc(int n, FieldSelector fieldSelector) throws
CorruptIndexException, IOException {
return doc(n, null, fieldSelector);
}
{code}
you could do:
{code}
final Document doc(int n, FieldSelector fieldSelector) throws
CorruptIndexException, IOException {
return doc(n, new Document(), fieldSelector);
}
{code}
then, the interface for doc(int, Document, FieldSelector) can state that the
document must not be null, and can skip the if null, new Document check later on
> 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: [email protected]
For additional commands, e-mail: [email protected]