You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2009/08/22 10:49:14 UTC
[jira] Commented: (LUCENE-1839) Scorer.explain is deprecated but
abstract, should have impl that throws UnsupportedOperationException
[ https://issues.apache.org/jira/browse/LUCENE-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12746431#action_12746431 ]
Michael McCandless commented on LUCENE-1839:
--------------------------------------------
+1
> Scorer.explain is deprecated but abstract, should have impl that throws UnsupportedOperationException
> -----------------------------------------------------------------------------------------------------
>
> Key: LUCENE-1839
> URL: https://issues.apache.org/jira/browse/LUCENE-1839
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Search
> Reporter: Tim Smith
> Priority: Minor
> Fix For: 2.9
>
>
> Suggest having Scorer implement explain to throw UnsupportedOperationException
> right now, i have to implement this method (because its abstract), and javac yells at me for overriding a deprecated method
> if the following implementation is in Scorer, i can remove my "empty" implementations of explain from my Scorers
> {code}
> /** Returns an explanation of the score for a document.
> * <br>When this method is used, the {@link #next()}, {@link #skipTo(int)} and
> * {@link #score(HitCollector)} methods should not be used.
> * @param doc The document number for the explanation.
> *
> * @deprecated Please use {@link IndexSearcher#explain}
> * or {@link Weight#explain} instead.
> */
> public Explanation explain(int doc) throws IOException {
> throw new UnsupportedOperationException();
> }
> {code}
> best i figure, this shouldn't break back compat (people already have to recompile anyway) (2.9 definitely not binary compatible with 2.4)
--
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org