You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by ma...@apache.org on 2009/11/20 02:04:30 UTC

svn commit: r882374 - /lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java

Author: markrmiller
Date: Fri Nov 20 01:04:29 2009
New Revision: 882374

URL: http://svn.apache.org/viewvc?rev=882374&view=rev
Log:
dont call doExplain twice

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java?rev=882374&r1=882373&r2=882374&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java Fri Nov 20 01:04:29 2009
@@ -349,7 +349,7 @@
     @Override
     public Explanation explain(IndexReader reader, int doc) throws IOException {
       Explanation explain = doExplain(reader, doc);
-      return explain == null ? new Explanation(0.0f, "no matching docs") : doExplain(reader, doc);
+      return explain == null ? new Explanation(0.0f, "no matching docs") : explain;
     }
     
     private Explanation doExplain(IndexReader reader, int doc) throws IOException {