lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject svn commit: r157224 - lucene/java/trunk/src/test/org/apache/lucene/IndexTest.java
Date Sat, 12 Mar 2005 03:31:06 GMT
Author: otis
Date: Fri Mar 11 19:31:05 2005
New Revision: 157224

URL: http://svn.apache.org/viewcvs?view=rev&rev=157224
Log:
- Removed FIXMEs

Modified:
    lucene/java/trunk/src/test/org/apache/lucene/IndexTest.java

Modified: lucene/java/trunk/src/test/org/apache/lucene/IndexTest.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/test/org/apache/lucene/IndexTest.java?view=diff&r1=157223&r2=157224
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/IndexTest.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/IndexTest.java Fri Mar 11 19:31:05 2005
@@ -27,14 +27,12 @@
   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);
+      IndexWriter writer = new IndexWriter(File.createTempFile("luceneTest", "idx"),
+        new SimpleAnalyzer(), true);
 
       writer.setMergeFactor(20);
 
-      // FIXME: OG: what's with this hard-coded dirs??
-      indexDocs(writer, new File("F:\\recipes"));
+      indexDocs(writer, new File("/tmp"));
 
       writer.optimize();
       writer.close();
@@ -60,16 +58,16 @@
 
     } catch (Exception e) {
       System.out.println(" caught a " + e.getClass() +
-			 "\n with message: " + e.getMessage());
+          "\n with message: " + e.getMessage());
     }
   }
 
   public static void indexDocs(IndexWriter writer, File file)
-       throws Exception {
+    throws Exception {
     if (file.isDirectory()) {
       String[] files = file.list();
       for (int i = 0; i < files.length; i++)
-	indexDocs(writer, new File(file, files[i]));
+        indexDocs(writer, new File(file, files[i]));
     } else {
       System.out.println("adding " + file);
       writer.addDocument(FileDocument.Document(file));



Mime
View raw message