You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by ot...@apache.org on 2004/03/30 15:23:00 UTC
cvs commit: jakarta-lucene/src/demo/org/apache/lucene/demo IndexFiles.java
otis 2004/03/30 05:23:00
Modified: src/demo/org/apache/lucene/demo IndexFiles.java
Log:
- Applied a patch for bug 28030: http://issues.apache.org/bugzilla/show_bug.cgi?id=28030
(and made some small changes to it)
PR: 28030
Revision Changes Path
1.3 +8 -3 jakarta-lucene/src/demo/org/apache/lucene/demo/IndexFiles.java
Index: IndexFiles.java
===================================================================
RCS file: /home/cvs/jakarta-lucene/src/demo/org/apache/lucene/demo/IndexFiles.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- IndexFiles.java 29 Jan 2004 12:25:10 -0000 1.2
+++ IndexFiles.java 30 Mar 2004 13:22:59 -0000 1.3
@@ -26,9 +26,14 @@
class IndexFiles {
public static void main(String[] args) throws IOException {
- try {
- Date start = new Date();
+ String usage = "java " + IndexFiles.class + " <root_directory>";
+ if (args.length == 0) {
+ System.err.println("Usage: " + usage);
+ System.exit(1);
+ }
+ Date start = new Date();
+ try {
IndexWriter writer = new IndexWriter("index", new StandardAnalyzer(), true);
indexDocs(writer, new File(args[0]));
@@ -42,7 +47,7 @@
} catch (IOException e) {
System.out.println(" caught a " + e.getClass() +
- "\n with message: " + e.getMessage());
+ "\n with message: " + e.getMessage());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org