lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r788954 - /lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanQuery.java
Date Sat, 27 Jun 2009 11:14:42 GMT
Author: mikemccand
Date: Sat Jun 27 11:14:42 2009
New Revision: 788954

URL: http://svn.apache.org/viewvc?rev=788954&view=rev
Log:
LUCENE-1630: additional test case

Modified:
    lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanQuery.java

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanQuery.java?rev=788954&r1=788953&r2=788954&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanQuery.java Sat Jun 27 11:14:42
2009
@@ -74,6 +74,14 @@
     q.add(pq, BooleanClause.Occur.SHOULD);
     assertEquals(1, s.search(q, 10).totalHits);
 
+    // A required clause which returns null scorer should return null scorer to
+    // IndexSearcher.
+    q = new BooleanQuery();
+    pq = new PhraseQuery();
+    q.add(new TermQuery(new Term("field", "a")), BooleanClause.Occur.SHOULD);
+    q.add(pq, BooleanClause.Occur.MUST);
+    assertEquals(0, s.search(q, 10).totalHits);
+
     DisjunctionMaxQuery dmq = new DisjunctionMaxQuery(1.0f);
     dmq.add(new TermQuery(new Term("field", "a")));
     dmq.add(pq);



Mime
View raw message