lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r831091 - /lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermScorer.java
Date Thu, 29 Oct 2009 21:25:11 GMT
Author: markrmiller
Date: Thu Oct 29 21:25:10 2009
New Revision: 831091

URL: http://svn.apache.org/viewvc?rev=831091&view=rev
Log:
remove explain test for termscorer

Modified:
    lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermScorer.java

Modified: lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermScorer.java?rev=831091&r1=831090&r2=831091&view=diff
==============================================================================
--- lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermScorer.java
(original)
+++ lucene/java/branches/flex_1458_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermScorer.java
Thu Oct 29 21:25:10 2009
@@ -158,50 +158,6 @@
         assertTrue("doc should be number 5", ts.docID() == 5);
     }
 
-    public void testExplain() throws Exception
-    {
-        Term allTerm = new Term(FIELD, "all");
-        TermQuery termQuery = new TermQuery(allTerm);
-
-        Weight weight = termQuery.weight(indexSearcher);
-
-        Scorer ts = weight.scorer(indexSearcher.getIndexReader(),
-                                  true, true);
-
-        Explanation explanation = ts.explain(0);
-        assertTrue("explanation is null and it shouldn't be", explanation != null);
-        //System.out.println("Explanation: " + explanation.toString());
-        //All this Explain does is return the term frequency
-        assertTrue("term frq is not 1", explanation.getValue() == 1);
-        explanation = ts.explain(1);
-        assertTrue("explanation is null and it shouldn't be", explanation != null);
-        //System.out.println("Explanation: " + explanation.toString());
-        //All this Explain does is return the term frequency
-        assertTrue("term frq is not 0", explanation.getValue() == 0);
-
-        Term dogsTerm = new Term(FIELD, "dogs");
-        termQuery = new TermQuery(dogsTerm);
-        weight = termQuery.weight(indexSearcher);
-
-        ts = weight.scorer(indexSearcher.getIndexReader(),
-                           true, true);
-
-        explanation = ts.explain(1);
-        assertTrue("explanation is null and it shouldn't be", explanation != null);
-        //System.out.println("Explanation: " + explanation.toString());
-        //All this Explain does is return the term frequency
-        float sqrtTwo = (float)Math.sqrt(2.0f);
-        assertTrue("term frq: " + explanation.getValue() + " is not the square root of 2",
explanation.getValue() == sqrtTwo);
-
-        explanation = ts.explain(10);//try a doc out of range
-        assertTrue("explanation is null and it shouldn't be", explanation != null);
-        //System.out.println("Explanation: " + explanation.toString());
-        //All this Explain does is return the term frequency
-
-        assertTrue("term frq: " + explanation.getValue() + " is not 0", explanation.getValue()
== 0);
-
-    }
-
     private class TestHit {
         public int doc;
         public float score;



Mime
View raw message