lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene/src/test/org/apache/lucene/search TestMultiPhraseQuery.java
Date Wed, 10 Nov 2004 11:39:26 GMT
dnaber      2004/11/10 03:39:26

  Modified:    src/test/org/apache/lucene/search TestMultiPhraseQuery.java
  Log:
  test that IllegalArgumentException is thrown if terms belong to different fields
  
  Revision  Changes    Path
  1.2       +11 -1     jakarta-lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java
  
  Index: TestMultiPhraseQuery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestMultiPhraseQuery.java	10 Oct 2004 15:33:56 -0000	1.1
  +++ TestMultiPhraseQuery.java	10 Nov 2004 11:39:25 -0000	1.2
  @@ -122,5 +122,15 @@
           result = searcher.search(query3);
           assertEquals(2, result.length()); // blueberry pizza, blueberry chewing gum
           assertEquals("body:\"(blueberry bluebird) pizza\"", query3.toString());
  +
  +        MultiPhraseQuery query4 = new MultiPhraseQuery();
  +        try {
  +          query4.add(new Term("field1", "foo"));
  +          query4.add(new Term("field2", "foobar"));
  +          fail();
  +        } catch(IllegalArgumentException e) {
  +          // okay, all terms must belong to the same field
  +        }
  +
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message