Updated for new demo package name.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149655 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Doug Cutting 2002-01-27 23:20:30 +00:00
parent 26f5fbf0c0
commit 6c84ee2c62
1 changed files with 11 additions and 11 deletions

View File

@ -82,26 +82,26 @@ method.</li>
Some simple examples of code which does this are:
<ul>
<li>
&nbsp;<a href="../../src/demo/org/apache/lucene/FileDocument.java">FileDocument.java</a> contains
&nbsp;<a href="../../src/demo/org/apache/lucene/demo/FileDocument.java">FileDocument.java</a> contains
code to create a Document for a file.</li>
<li>
&nbsp;<a href="../../src/demo/org/apache/lucene/IndexFiles.java">IndexFiles.java</a> creates an
&nbsp;<a href="../../src/demo/org/apache/lucene/demo/IndexFiles.java">IndexFiles.java</a> creates an
index for all the files contained in a directory.</li>
<li>
&nbsp;<a href="../../src/demo/org/apache/lucene/DeleteFiles.java">DeleteFiles.java</a> deletes some
&nbsp;<a href="../../src/demo/org/apache/lucene/demo/DeleteFiles.java">DeleteFiles.java</a> deletes some
of these files from the index.</li>
<li>
&nbsp;<a href="../../src/demo/org/apache/lucene/SearchFiles.java">SearchFiles.java</a> prompts for
&nbsp;<a href="../../src/demo/org/apache/lucene/demo/SearchFiles.java">SearchFiles.java</a> prompts for
queries and searches an index.</li>
</ul>
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>
<blockquote><tt>> <b>java -cp lucene.jar:lucene-demo.jar org.apache.lucene.demo.IndexFiles rec.food.recipes/soups</b></tt>
<br><tt>adding rec.food.recipes/soups/abalone-chowder</tt>
<br><tt>&nbsp; </tt>[ ... ]
<p><tt>> <b>java -cp lucene.jar:demo/classes org.apache.lucene.SearchFiles</b></tt>
<p><tt>> <b>java -cp lucene.jar:lucene-demo.jar org.apache.lucene.demo.SearchFiles</b></tt>
<br><tt>Query: <b>chowder</b></tt>
<br><tt>Searching for: chowder</tt>
<br><tt>34 total matching documents</tt>
@ -128,18 +128,18 @@ field. ]
]
<br>&nbsp;&nbsp;&nbsp; [ Note: "+" and "-" are canonical, but "AND", "OR"
and "NOT" may be used. ]</blockquote>
The <a href="../../src/demo/org/apache/lucene/IndexHTML.java">IndexHtml</a> demo is more sophisticated.&nbsp;
The <a href="../../src/demo/org/apache/lucene/demo/IndexHTML.java">IndexHtml</a> demo is more sophisticated.&nbsp;
It incrementally maintains an index of HTML files, adding new files as
they appear, deleting old files as they disappear and re-indexing files
as they change.
<blockquote><tt>> <b>java -cp lucene.jar:demo/classes org.apache.lucene.IndexHTML -create java/jdk1.1.6/docs/relnotes</b></tt>
<blockquote><tt>> <b>java -cp lucene.jar:lucene-demo.jar org.apache.lucene.demo.IndexHTML -create java/jdk1.1.6/docs/relnotes</b></tt>
<br><tt>adding java/jdk1.1.6/docs/relnotes/SMICopyright.html</tt>
<br><tt>&nbsp; </tt>[ ... create an index containing all the relnotes ]
<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.IndexHTML java/jdk1.1.6/docs/relnotes</b></tt>
<p><tt>> <b>java -cp lucene.jar:lucene-demo.jar org.apache.lucene.demo.IndexHTML 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="../../src/demo/org/apache/lucene/Search.jhtml">Search.jhtml</a>.&nbsp; To use
(JWS) and <a href="../../src/demo/org/apache/lucene/demo/Search.jhtml">Search.jhtml</a>.&nbsp; To use
this:
<ul>
<li>
@ -158,7 +158,7 @@ launch JWS, with the <tt>demo</tt> directory on CLASSPATH (only one class
is actually needed);</li>
<li>
visit <a href="../../src/demo/org/apache/lucene/Search.html">Search.html</a>.</li>
visit <a href="../../src/demo/org/apache/lucene/demo/Search.html">Search.html</a>.</li>
</ul>
Note that indexes can be updated while searches are going on.&nbsp; <tt>Search.jhtml</tt>
will re-open the index when it is updated so that the latest version is