[ 
https://issues.apache.org/jira/browse/LUCENE-4663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Muir updated LUCENE-4663:
--------------------------------

    Attachment: LUCENE-4663.patch

Here's one possible patch: in 4.x we would just deprecate document(), with it 
still being final, just forwarding to the new non-final doc().

                
> IndexSearcher.document() should not be final
> --------------------------------------------
>
>                 Key: LUCENE-4663
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4663
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-4663.patch
>
>
> IndexSearcher has 3 methods:
> {noformat}
> StoredDocument doc(int)
> void doc(int, StoredFieldVisitor)
> final StoredDocument document(int, Set<String>)
> {noformat}
> The last one is confusing for subclasses (e.g. SolrIndexSearcher) that 
> override these methods. for example that one has its own StoredDocument 
> doc(int, Set) method. 
> But now this means a user could always call the wrong method (this final 
> document() method) and get the wrong behavior (versus calling doc()).
> I think the name is also wrong. it should be doc() like the others.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to