mirror of https://github.com/apache/lucene.git
LUCENE-1630: additional test case
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@788954 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8a641eb4f7
commit
ef59ce971c
|
@ -74,6 +74,14 @@ public class TestBooleanQuery extends LuceneTestCase {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue