lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r161998 - lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanQuery.java
Date Wed, 20 Apr 2005 01:05:52 GMT
Author: ehatcher
Date: Tue Apr 19 18:05:52 2005
New Revision: 161998

URL: http://svn.apache.org/viewcvs?view=rev&rev=161998
Log:
add nested clauses for .equals test

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/viewcvs/lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanQuery.java?view=diff&r1=161997&r2=161998
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanQuery.java Tue Apr 19 18:05:52
2005
@@ -24,10 +24,18 @@
     BooleanQuery bq1 = new BooleanQuery();
     bq1.add(new TermQuery(new Term("field", "value1")), BooleanClause.Occur.SHOULD);
     bq1.add(new TermQuery(new Term("field", "value2")), BooleanClause.Occur.SHOULD);
+    BooleanQuery nested1 = new BooleanQuery();
+    nested1.add(new TermQuery(new Term("field", "nestedvalue1")), BooleanClause.Occur.SHOULD);
+    nested1.add(new TermQuery(new Term("field", "nestedvalue2")), BooleanClause.Occur.SHOULD);
+    bq1.add(nested1, BooleanClause.Occur.SHOULD);
 
     BooleanQuery bq2 = new BooleanQuery();
     bq2.add(new TermQuery(new Term("field", "value1")), BooleanClause.Occur.SHOULD);
     bq2.add(new TermQuery(new Term("field", "value2")), BooleanClause.Occur.SHOULD);
+    BooleanQuery nested2 = new BooleanQuery();
+    nested2.add(new TermQuery(new Term("field", "nestedvalue1")), BooleanClause.Occur.SHOULD);
+    nested2.add(new TermQuery(new Term("field", "nestedvalue2")), BooleanClause.Occur.SHOULD);
+    bq2.add(nested2, BooleanClause.Occur.SHOULD);
 
     assertEquals(bq1, bq2);
   }



Mime
View raw message