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 TestDocBoost.java TestRemoteSearchable.java TestSimilarity.java
Date Wed, 29 Jan 2003 17:43:14 GMT
otis        2003/01/29 09:43:13

  Modified:    src/test/org/apache/lucene AnalysisTest.java IndexTest.java
                        SearchTest.java SearchTestForDuplicates.java
                        ThreadSafetyTest.java
               src/test/org/apache/lucene/analysis TestAnalyzers.java
               src/test/org/apache/lucene/analysis/ru
                        TestRussianAnalyzer.java TestRussianStem.java
               src/test/org/apache/lucene/index DocTest.java
                        TermInfosTest.java
               src/test/org/apache/lucene/search TestDocBoost.java
                        TestRemoteSearchable.java TestSimilarity.java
  Log:
  - Cleaned up unused or duplicate imports.
  
  Revision  Changes    Path
  1.3       +1 -1      jakarta-lucene/src/test/org/apache/lucene/AnalysisTest.java
  
  Index: AnalysisTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/AnalysisTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AnalysisTest.java	18 Sep 2001 17:35:57 -0000	1.2
  +++ AnalysisTest.java	29 Jan 2003 17:43:12 -0000	1.3
  @@ -66,12 +66,12 @@
   import java.io.BufferedReader;
   import java.io.InputStreamReader;
   import java.util.Date;
  -import java.util.Random;
   
   class AnalysisTest {
     public static void main(String[] args) {
       try {
         test("This is a test", true);
  +      // FIXME: OG: what's with this hard-coded file name??
         test(new File("words.txt"), false);
       } catch (Exception e) {
         System.out.println(" caught a " + e.getClass() +
  
  
  
  1.4       +2 -3      jakarta-lucene/src/test/org/apache/lucene/IndexTest.java
  
  Index: IndexTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/IndexTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IndexTest.java	26 Jan 2002 15:01:32 -0000	1.3
  +++ IndexTest.java	29 Jan 2003 17:43:12 -0000	1.4
  @@ -56,8 +56,6 @@
   
   import org.apache.lucene.analysis.SimpleAnalyzer;
   import org.apache.lucene.index.IndexWriter;
  -import org.apache.lucene.index.TermPositions;
  -import org.apache.lucene.document.Document;
   import org.apache.lucene.demo.FileDocument;
   
   import java.io.File;
  @@ -67,12 +65,13 @@
     public static void main(String[] args) {
       try {
         Date start = new Date();
  -
  +      // FIXME: OG: what's with this hard-coded dirs??
         IndexWriter writer = new IndexWriter("F:\\test", new SimpleAnalyzer(),
   					   true);
   
         writer.mergeFactor = 20;
   
  +      // FIXME: OG: what's with this hard-coded dirs??
         indexDocs(writer, new File("F:\\recipes"));
   
         writer.optimize();
  
  
  
  1.4       +0 -2      jakarta-lucene/src/test/org/apache/lucene/SearchTest.java
  
  Index: SearchTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/SearchTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SearchTest.java	1 Nov 2001 01:13:00 -0000	1.3
  +++ SearchTest.java	29 Jan 2003 17:43:12 -0000	1.4
  @@ -54,8 +54,6 @@
    * <http://www.apache.org/>.
    */
   
  -import java.io.IOException;
  -import java.util.Date;
   import java.util.GregorianCalendar;
   
   import org.apache.lucene.store.*;
  
  
  
  1.5       +0 -2      jakarta-lucene/src/test/org/apache/lucene/SearchTestForDuplicates.java
  
  Index: SearchTestForDuplicates.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/SearchTestForDuplicates.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SearchTestForDuplicates.java	19 Nov 2002 23:25:46 -0000	1.4
  +++ SearchTestForDuplicates.java	29 Jan 2003 17:43:12 -0000	1.5
  @@ -55,8 +55,6 @@
    */
   
   import java.io.IOException;
  -import java.util.Date;
  -import java.util.GregorianCalendar;
   
   import org.apache.lucene.store.*;
   import org.apache.lucene.document.*;
  
  
  
  1.4       +0 -1      jakarta-lucene/src/test/org/apache/lucene/ThreadSafetyTest.java
  
  Index: ThreadSafetyTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/ThreadSafetyTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ThreadSafetyTest.java	27 Sep 2001 16:27:02 -0000	1.3
  +++ ThreadSafetyTest.java	29 Jan 2003 17:43:13 -0000	1.4
  @@ -61,7 +61,6 @@
   import org.apache.lucene.search.*;
   import org.apache.lucene.queryParser.*;
   
  -import java.io.File;
   import java.util.Random;
   
   class ThreadSafetyTest {
  
  
  
  1.4       +0 -1      jakarta-lucene/src/test/org/apache/lucene/analysis/TestAnalyzers.java
  
  Index: TestAnalyzers.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/analysis/TestAnalyzers.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestAnalyzers.java	24 Jan 2002 19:03:52 -0000	1.3
  +++ TestAnalyzers.java	29 Jan 2003 17:43:13 -0000	1.4
  @@ -59,7 +59,6 @@
   
   import org.apache.lucene.*;
   import org.apache.lucene.analysis.*;
  -import org.apache.lucene.analysis.Token;
   
   public class TestAnalyzers extends TestCase {
   
  
  
  
  1.3       +3 -9      jakarta-lucene/src/test/org/apache/lucene/analysis/ru/TestRussianAnalyzer.java
  
  Index: TestRussianAnalyzer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/analysis/ru/TestRussianAnalyzer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestRussianAnalyzer.java	18 Sep 2002 20:05:52 -0000	1.2
  +++ TestRussianAnalyzer.java	29 Jan 2003 17:43:13 -0000	1.3
  @@ -55,21 +55,15 @@
    */
   
   import junit.framework.TestCase;
  -import java.io.BufferedReader;
  -import java.io.BufferedWriter;
  +
   import java.io.FileReader;
  -import java.io.FileWriter;
   
   import java.io.InputStreamReader;
  -import java.io.OutputStreamWriter;
   import java.io.FileInputStream;
  -import java.io.FileOutputStream;
   import java.io.IOException;
  -import java.io.UnsupportedEncodingException;
  -import java.util.ArrayList;
  +
   import org.apache.lucene.analysis.TokenStream;
   import org.apache.lucene.analysis.Token;
  -import org.apache.lucene.analysis.standard.StandardAnalyzer;
   
   /**
    * Test case for RussianAnalyzer.
  
  
  
  1.3       +1 -2      jakarta-lucene/src/test/org/apache/lucene/analysis/ru/TestRussianStem.java
  
  Index: TestRussianStem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/analysis/ru/TestRussianStem.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestRussianStem.java	18 Sep 2002 20:05:52 -0000	1.2
  +++ TestRussianStem.java	29 Jan 2003 17:43:13 -0000	1.3
  @@ -55,11 +55,10 @@
    */
   
   import junit.framework.TestCase;
  +
   import java.io.BufferedReader;
   import java.io.InputStreamReader;
   import java.io.FileInputStream;
  -import java.io.IOException;
  -import java.io.UnsupportedEncodingException;
   import java.util.ArrayList;
   
   public class TestRussianStem extends TestCase
  
  
  
  1.5       +4 -5      jakarta-lucene/src/test/org/apache/lucene/index/DocTest.java
  
  Index: DocTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/DocTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DocTest.java	7 Nov 2002 17:31:27 -0000	1.4
  +++ DocTest.java	29 Jan 2003 17:43:13 -0000	1.5
  @@ -63,9 +63,8 @@
   import org.apache.lucene.demo.FileDocument;
   
   import java.io.File;
  -import java.util.Date;
  -
   
  +// FIXME: OG: remove hard-coded file names
   class DocTest {
     public static void main(String[] args) {
       try {
  @@ -76,7 +75,7 @@
         printSegment("one");
         indexDoc("two", "test2.txt");
         printSegment("two");
  -      
  +
         merge("one", "two", "merge");
         printSegment("merge");
   
  @@ -130,12 +129,12 @@
   
       for (int i = 0; i < reader.numDocs(); i++)
         System.out.println(reader.document(i));
  -    
  +
       TermEnum tis = reader.terms();
       while (tis.next()) {
         System.out.print(tis.term());
         System.out.println(" DF=" + tis.docFreq());
  -      
  +
         TermPositions positions = reader.termPositions(tis.term());
         try {
   	while (positions.next()) {
  
  
  
  1.3       +2 -1      jakarta-lucene/src/test/org/apache/lucene/index/TermInfosTest.java
  
  Index: TermInfosTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TermInfosTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TermInfosTest.java	1 Nov 2001 01:13:00 -0000	1.2
  +++ TermInfosTest.java	29 Jan 2003 17:43:13 -0000	1.3
  @@ -75,9 +75,10 @@
       }
     }
   
  +  // FIXME: OG: remove hard-coded file names
     public static void test()
          throws Exception {
  -    
  +
       File file = new File("words.txt");
       System.out.println(" reading word file containing " +
   		       file.length() + " bytes");
  
  
  
  1.3       +7 -9      jakarta-lucene/src/test/org/apache/lucene/search/TestDocBoost.java
  
  Index: TestDocBoost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/search/TestDocBoost.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestDocBoost.java	7 Nov 2002 17:31:27 -0000	1.2
  +++ TestDocBoost.java	29 Jan 2003 17:43:13 -0000	1.3
  @@ -54,23 +54,21 @@
    * <http://www.apache.org/>.
    */
   
  +import junit.framework.TestCase;
  +
   import org.apache.lucene.index.Term;
   import org.apache.lucene.index.IndexWriter;
  -import org.apache.lucene.search.Query;
  -import org.apache.lucene.search.Hits;
   import org.apache.lucene.search.IndexSearcher;
   import org.apache.lucene.store.RAMDirectory;
   import org.apache.lucene.analysis.SimpleAnalyzer;
   import org.apache.lucene.document.Document;
   import org.apache.lucene.document.Field;
   
  -import junit.framework.TestCase;
  -
  - /** Document boost unit test.
  -  *
  -  * @author Doug Cutting
  -  * @version $Revision$
  -  */
  +/** Document boost unit test.
  + *
  + * @author Doug Cutting
  + * @version $Revision$
  + */
   public class TestDocBoost extends TestCase {
     public TestDocBoost(String name) {
       super(name);
  
  
  
  1.4       +2 -4      jakarta-lucene/src/test/org/apache/lucene/search/TestRemoteSearchable.java
  
  Index: TestRemoteSearchable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/search/TestRemoteSearchable.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestRemoteSearchable.java	15 Aug 2002 23:44:00 -0000	1.3
  +++ TestRemoteSearchable.java	29 Jan 2003 17:43:13 -0000	1.4
  @@ -54,12 +54,10 @@
    * <http://www.apache.org/>.
    */
   
  +import junit.framework.TestCase;
  +
   import java.rmi.Naming;
  -import java.rmi.RemoteException;
  -import java.rmi.NotBoundException;
   import java.rmi.registry.LocateRegistry;
  -
  -import junit.framework.TestCase;
   
   import org.apache.lucene.index.Term;
   import org.apache.lucene.index.IndexWriter;
  
  
  
  1.2       +9 -11     jakarta-lucene/src/test/org/apache/lucene/search/TestSimilarity.java
  
  Index: TestSimilarity.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/search/TestSimilarity.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestSimilarity.java	7 Nov 2002 17:31:27 -0000	1.1
  +++ TestSimilarity.java	29 Jan 2003 17:43:13 -0000	1.2
  @@ -54,25 +54,23 @@
    * <http://www.apache.org/>.
    */
   
  +import junit.framework.TestCase;
  +
  +import java.util.Vector;
  +
   import org.apache.lucene.index.Term;
   import org.apache.lucene.index.IndexWriter;
  -import org.apache.lucene.search.Query;
  -import org.apache.lucene.search.Hits;
   import org.apache.lucene.search.IndexSearcher;
   import org.apache.lucene.store.RAMDirectory;
   import org.apache.lucene.analysis.SimpleAnalyzer;
   import org.apache.lucene.document.Document;
   import org.apache.lucene.document.Field;
   
  -import junit.framework.TestCase;
  -
  -import java.util.Vector;
  -
  - /** Similarity unit test.
  -  *
  -  * @author Doug Cutting
  -  * @version $Revision$
  -  */
  +/** Similarity unit test.
  + *
  + * @author Doug Cutting
  + * @version $Revision$
  + */
   public class TestSimilarity extends TestCase {
     public TestSimilarity(String name) {
       super(name);
  
  
  

---------------------------------------------------------------------
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