You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/05/13 19:23:56 UTC

svn commit: r1481978 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/core/ solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java

Author: rmuir
Date: Mon May 13 17:23:56 2013
New Revision: 1481978

URL: http://svn.apache.org/r1481978
Log:
SOLR-4785: add gbowyer's tests to unbreak build

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java?rev=1481978&r1=1481977&r2=1481978&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java Mon May 13 17:23:56 2013
@@ -32,8 +32,8 @@ import org.junit.BeforeClass;
 
 /**
  * Sanity checks that queries (generated by the QParser and ValueSourceParser 
- * framework) are appropraitely {@link Object#equals} and 
- * {@link Object#hashCode()} equivilent.  If you are adding a new default 
+ * framework) are appropriately {@link Object#equals} and 
+ * {@link Object#hashCode()} equivalent.  If you are adding a new default 
  * QParser or ValueSourceParser, you will most likely get a failure from
  * {@link #testParserCoverage} until you add a new test method to this class.
  *
@@ -76,7 +76,7 @@ public class QueryEqualityTest extends S
 
 
   public void testDateMathParsingEquality() throws Exception {
-    // regardless of parser, these should all be equivilent queries
+    // regardless of parser, these should all be equivalent queries
     assertQueryEquals
       (null
        ,"{!lucene}f_tdt:2013-09-11T00\\:00\\:00Z"
@@ -704,6 +704,18 @@ public class QueryEqualityTest extends S
     assertFuncEquals("sleep(1,5)", "sleep(1,5)");
     assertFuncEquals("threadid()", "threadid()");
   }
+  
+  // TODO: more tests
+  public void testQueryMaxScore() throws Exception {
+    assertQueryEquals("maxscore", "{!maxscore}A OR B OR C",
+                      "A OR B OR C");
+    assertQueryEquals("maxscore", "{!maxscore}A AND B",
+                      "A AND B");
+    assertQueryEquals("maxscore", "{!maxscore}apache -solr",
+        "apache  -solr", "apache -solr ");
+    assertQueryEquals("maxscore", "+apache +solr", "apache AND solr",
+        "+apache +solr");
+  }
 
   /**
    * this test does not assert anything itself, it simply toggles a static