lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1063478 - /lucene/dev/trunk/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java
Date Tue, 25 Jan 2011 22:00:15 GMT
Author: rmuir
Date: Tue Jan 25 22:00:14 2011
New Revision: 1063478

URL: http://svn.apache.org/viewvc?rev=1063478&view=rev
Log:
LUCENE-792: add test for PrecedenceQueryParser NOT bug

Modified:
    lucene/dev/trunk/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java

Modified: lucene/dev/trunk/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java?rev=1063478&r1=1063477&r2=1063478&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java
(original)
+++ lucene/dev/trunk/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java
Tue Jan 25 22:00:14 2011
@@ -567,6 +567,12 @@ public class TestPrecedenceQueryParser e
       // too many boolean clauses, so ParseException is expected
     }
   }
+  
+  // LUCENE-792
+  public void testNOT() throws Exception {
+    Analyzer a = new MockAnalyzer(MockTokenizer.WHITESPACE, false);
+    assertQueryEquals("NOT foo AND bar", a, "-foo +bar");
+  }
 
   /**
    * This test differs from the original QueryParser, showing how the precedence



Mime
View raw message