lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject cvs commit: jakarta-lucene/src/test/org/apache/lucene/search TestWildcard.java
Date Thu, 18 Jul 2002 14:41:39 GMT
otis        2002/07/18 07:41:39

  Modified:    src/test/org/apache/lucene/search TestWildcard.java
  Log:
  - Minor modification, no functionality changes.
  
  Revision  Changes    Path
  1.4       +8 -7      jakarta-lucene/src/test/org/apache/lucene/search/TestWildcard.java
  
  Index: TestWildcard.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/search/TestWildcard.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestWildcard.java	15 May 2002 15:51:04 -0000	1.3
  +++ TestWildcard.java	18 Jul 2002 14:41:39 -0000	1.4
  @@ -67,8 +67,9 @@
   import java.io.IOException;
   
   /**
  + * TestWildcard tests the '*' and '?' wildard characters.
    *
  - *
  + * @author Otis Gospodnetic
    */
   public class TestWildcard
       extends TestCase
  @@ -78,7 +79,7 @@
   	super(name);
       }
   
  -    /*
  +    /**
        *
        */
       public void testAsterisk()
  @@ -93,6 +94,8 @@
           writer.addDocument(doc1);
           writer.addDocument(doc2);
   	writer.optimize();
  +	writer.close();
  +
   	IndexSearcher searcher = new IndexSearcher(indexStore);
   	Query query1 = new TermQuery(new Term("body", "metal"));
           Query query2 = new WildcardQuery(new Term("body", "metal*"));
  @@ -112,8 +115,6 @@
   
   	result = searcher.search(query4);
   	assertEquals(2, result.length());
  -
  -	writer.close();
       }
   
       public void testQuestionmark()
  @@ -134,8 +135,10 @@
           writer.addDocument(doc3);
           writer.addDocument(doc4);
   	writer.optimize();
  +	writer.close();
  +
   	IndexSearcher searcher = new IndexSearcher(indexStore);
  -        Query query1 = new WildcardQuery(new Term("body", "m?tal")); 
  +        Query query1 = new WildcardQuery(new Term("body", "m?tal"));
           Query query2 = new WildcardQuery(new Term("body", "metal?"));
           Query query3 = new WildcardQuery(new Term("body", "metals?"));
           Query query4 = new WildcardQuery(new Term("body", "m?t?ls"));
  @@ -153,7 +156,5 @@
   
   	result = searcher.search(query4);
   	assertEquals(3, result.length());
  -
  -	writer.close();
       }
   }
  
  
  

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


Mime
View raw message