Apache Lucene open-source search software
Added demo files to distribution. Fixed calls to demo in overview.html.
Doug Cuttingd3c92823627a
diff --git a/build.xml b/build.xmlindex ceb17905e54..d3841f71411 100644--- a/build.xml+++ b/build.xml@@ -288,10 +288,13 @@<!-- ================================================================== --><!-- --><!-- ================================================================== -->- <target name="package" depends="jar, javadocs">+ <target name="package" depends="jar, javadocs, demo"><mkdir dir="${dist.dir}"/><mkdir dir="${dist.dir}/docs"/><mkdir dir="${dist.dir}/docs/api"/>+ <mkdir dir="${dist.dir}/demo"/>+ <mkdir dir="${dist.dir}/demo/src"/>+ <mkdir dir="${dist.dir}/demo/classes"/><copy todir="${dist.dir}/docs"><fileset dir="${docs.dir}"/>@@ -299,6 +302,12 @@<copy todir="${dist.dir}/docs/api"><fileset dir="${build.javadocs}"/></copy>+ <copy todir="${dist.dir}/demo/classes">+ <fileset dir="${build.demo.classes}"/>+ </copy>+ <copy todir="${dist.dir}/demo/src">+ <fileset dir="${build.demo.src}"/>+ </copy><copy file="${build.dir}/${final.name}.jar" todir="${dist.dir}"/></target>diff --git a/src/java/overview.html b/src/java/overview.htmlindex 075ce046024..adfcf832774 100644--- a/src/java/overview.html+++ b/src/java/overview.html@@ -82,64 +82,64 @@ method.</li>Some simple examples of code which does this are:<ul><li>- <a href="../demo/FileDocument.java">FileDocument.java</a> contains+ <a href="../../demo/src/org/apache/lucene/FileDocument.java">FileDocument.java</a> containscode to create a Document for a file.</li><li>- <a href="../demo/IndexFiles.java">IndexFiles.java</a> creates an+ <a href="../../demo/src/org/apache/lucene/IndexFiles.java">IndexFiles.java</a> creates anindex for all the files contained in a directory.</li><li>- <a href="../demo/DeleteFiles.java">DeleteFiles.java</a> deletes some+ <a href="../../demo/src/org/apache/lucene/DeleteFiles.java">DeleteFiles.java</a> deletes someof these files from the index.</li><li>- <a href="../demo/SearchFiles.java">SearchFiles.java</a> prompts for+ <a href="../../demo/src/org/apache/lucene/SearchFiles.java">SearchFiles.java</a> prompts forqueries and searches an index.</li></ul>-To demonstrate these, try:-<blockquote><tt>F:\> <b>java demo.IndexFiles rec.food.recipes\soups</b></tt>-<br><tt>adding rec.food.recipes\soups\abalone-chowder</tt>+To demonstrate these, try something like:+<blockquote><tt>> <b>java -cp lucene.jar:demo/classes org.apache.lucene.IndexFiles rec.food.recipes/soups</b></tt>+<br><tt>adding rec.food.recipes/soups/abalone-chowder</tt><br><tt> </tt>[ ... ]-<p><tt>F:\> <b>java demo.SearchFiles</b></tt>+<p><tt>> <b>java -cp lucene.jar:demo/classes org.apache.lucene.IndexFilesSearchFiles</b></tt><br><tt>Query: <b>chowder</b></tt><br><tt>Searching for: chowder</tt><br><tt>34 total matching documents</tt>-<br><tt>0. rec.food.recipes\soups\spam-chowder</tt>+<br><tt>0. rec.food.recipes/soups/spam-chowder</tt><br><tt> </tt>[ ... thirty-four documents contain the word "chowder","spam-chowder" with the greatest density.]<p><tt>Query: <b>path:chowder</b></tt><br><tt>Searching for: path:chowder</tt><br><tt>31 total matching documents</tt>-<br><tt>0. rec.food.recipes\soups\abalone-chowder</tt>+<br><tt>0. rec.food.recipes/soups/abalone-chowder</tt><br><tt> </tt>[ ... only thrity-one have "chowder" in the "path"field. ]<p><tt>Query: <b>path:"clam chowder"</b></tt><br><tt>Searching for: path:"clam chowder"</tt><br><tt>10 total matching documents</tt>-<br><tt>0. rec.food.recipes\soups\clam-chowder</tt>+<br><tt>0. rec.food.recipes/soups/clam-chowder</tt><br><tt> </tt>[ ... only ten have "clam chowder" in the "path" field.]<p><tt>Query: <b>path:"clam chowder" AND manhattan</b></tt><br><tt>Searching for: +path:"clam chowder" +manhattan</tt><br><tt>2 total matching documents</tt>-<br><tt>0. rec.food.recipes\soups\clam-chowder</tt>+<br><tt>0. rec.food.recipes/soups/clam-chowder</tt><br><tt> </tt>[ ... only two also have "manhattan" in the contents.]<br> [ Note: "+" and "-" are canonical, but "AND", "OR"and "NOT" may be used. ]</blockquote>-The <a href="../demo/IndexHTML.java">IndexHtml</a> demo is more sophisticated. +The <a href="../../demo/src/org/apache/lucene/IndexHTML.java">IndexHtml</a> demo is more sophisticated. It incrementally maintains an index of HTML files, adding new files asthey appear, deleting old files as they disappear and re-indexing filesas they change.-<blockquote><tt>F:\><b>java demo.IndexHTML -create java\jdk1.1.6\docs\relnotes</b></tt>+<blockquote><tt>> <b>java -cp lucene.jar:demo/classes org.apache.lucene.IndexFilesIndexHTML -create java/jdk1.1.6/docs/relnotes</b></tt><br><tt>adding java/jdk1.1.6/docs/relnotes/SMICopyright.html</tt><br><tt> </tt>[ ... create an index containing all the relnotes ]-<p><tt>F:\><b>del java\jdk1.1.6\docs\relnotes\smicopyright.html</b></tt>-<p><tt>F:\><b>java demo.IndexHTML java\jdk1.1.6\docs\relnotes</b></tt>+<p><tt>> <b>rm java/jdk1.1.6/docs/relnotes/smicopyright.html</b></tt>+<p><tt>> <b>java -cp lucene.jar:demo/classes org.apache.lucene.IndexFilesIndexHTML java/jdk1.1.6/docs/relnotes</b></tt><br><tt>deleting java/jdk1.1.6/docs/relnotes/SMICopyright.html</tt></blockquote>HTML indexes are searched using SUN's <a href="http://jserv.javasoft.com/products/webserver/index.html">JavaWebServer</a>-(JWS) and <a href="../demo/Search.jhtml">Search.jhtml</a>. To use+(JWS) and <a href="../../demo/src/org/apache/lucene/Search.jhtml">Search.jhtml</a>. To usethis:<ul><li>@@ -158,7 +158,7 @@ launch JWS, with the <tt>demo</tt> directory on CLASSPATH (only one classis actually needed);</li><li>-visit <a href="../demo/Search.html">Search.html</a>.</li>+visit <a href="../../demo/src/org/apache/lucene/Search.html">Search.html</a>.</li></ul>Note that indexes can be updated while searches are going on. <tt>Search.jhtml</tt>will re-open the index when it is updated so that the latest version is