From 1a3ce57455e8d99309866ee51d9ab8385e190b97 Mon Sep 17 00:00:00 2001 From: Otis Gospodnetic Date: Sat, 12 Mar 2005 03:31:05 +0000 Subject: [PATCH] - Removed FIXMEs git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@157224 13f79535-47bb-0310-9956-ffa450edef68 --- src/test/org/apache/lucene/IndexTest.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/test/org/apache/lucene/IndexTest.java b/src/test/org/apache/lucene/IndexTest.java index 1e9468172b0..55fa5b690f2 100644 --- a/src/test/org/apache/lucene/IndexTest.java +++ b/src/test/org/apache/lucene/IndexTest.java @@ -27,14 +27,12 @@ class IndexTest { 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 @@ class IndexTest { } 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));