Index: CHANGES.txt
===================================================================
--- CHANGES.txt (revision 544653)
+++ CHANGES.txt (working copy)
@@ -265,6 +265,8 @@
6. LUCENE-907: Include LICENSE.TXT and NOTICE.TXT in the META-INF dirs of
demo war, demo jar, and the contrib jars. (Michael Busch)
+
+ 7. LUCENE-909: Demo targets for running the demo. (Doron Cohen)
======================= Release 2.1.0 2007-02-14 =======================
Index: src/demo/org/apache/lucene/demo/SearchFiles.java
===================================================================
--- src/demo/org/apache/lucene/demo/SearchFiles.java (revision 544653)
+++ src/demo/org/apache/lucene/demo/SearchFiles.java (working copy)
@@ -111,13 +111,17 @@
QueryParser parser = new QueryParser(field, analyzer);
while (true) {
if (queries == null) // prompt the user
- System.out.print("Query: ");
+ System.out.println("Enter query: ");
String line = in.readLine();
if (line == null || line.length() == -1)
break;
+ line = line.trim();
+ if (line.length() == 0)
+ break;
+
Query query = parser.parse(line);
System.out.println("Searching for: " + query.toString(field));
@@ -161,7 +165,7 @@
break;
if (hits.length() > end) {
- System.out.print("more (y/n) ? ");
+ System.out.println("more (y/n) ? ");
line = in.readLine();
if (line.length() == 0 || line.charAt(0) == 'n')
break;
Index: src/demo/demo-build.template
===================================================================
--- src/demo/demo-build.template (revision 544653)
+++ src/demo/demo-build.template (working copy)
@@ -92,7 +92,68 @@
-
+
+
+
+
+
+
+ ----- (1) Prepare dir -----
+ cd ${common.dir}
+ rmdir demo-text-dir
+
+ mkdir demo-text-dir
+
+ cd demo-text-dir
+ ----- (2) Index the files located under ${common.dir}/src -----
+
+
+
+
+
+
+
+
+
+ ----- Interactive search -----
+ cd demo-text-dir
+
+
+
+
+
+
+
+
+
+
+ ----- (1) Prepare dir -----
+ cd ${common.dir}
+ rmdir demo-html-dir
+
+ mkdir demo-html-dir
+
+ cd demo-html-dir
+ ----- (2) Index the files located under ${common.dir}/src -----
+
+
+
+
+
+
+
+
+
+ ----- Interactive search -----
+ cd demo-html-dir
+
+
+
+
@@ -115,4 +176,26 @@
+
+
+
+
+
+
+ java -classpath "../${core.name}.jar;../${demo.name}.jar" org.apache.lucene.demo.@{class} @{paramsDisplay}
+
+
+
+
+
+
+
+
+
+