pylucene 3.5.0-3
[pylucene.git] / lucene-java-3.5.0 / lucene / src / site / src / documentation / content / xdocs / demo.xml
diff --git a/lucene-java-3.5.0/lucene/src/site/src/documentation/content/xdocs/demo.xml b/lucene-java-3.5.0/lucene/src/site/src/documentation/content/xdocs/demo.xml
new file mode 100644 (file)
index 0000000..210be3e
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<document>
+       <header>
+        <title>
+       Apache Lucene - Building and Installing the Basic Demo
+               </title>
+       </header>
+<properties>
+<author email="acoliver@apache.org">Andrew C. Oliver</author>
+</properties>
+<body>
+
+<section id="About this Document"><title>About this Document</title>
+<p>
+This document is intended as a "getting started" guide to using and running the Lucene demos.
+It walks you through some basic installation and configuration.
+</p>
+</section>
+
+
+<section id="About the Demo"><title>About the Demo</title>
+<p>
+The Lucene command-line demo code consists of an application that demonstrates various
+functionalities of Lucene and how you can add Lucene to your applications.
+</p>
+</section>
+
+<section id="Setting your CLASSPATH"><title>Setting your CLASSPATH</title>
+<p>
+First, you should <a href="http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the
+latest Lucene distribution and then extract it to a working directory.
+</p>
+<p>
+You need two JARs: the Lucene JAR, and the Lucene demo JAR.  You should
+see the Lucene JAR file in the directory you created when you extracted the archive -- it
+should be named something like <code>lucene-core-{version}.jar</code>.  You should also see a file
+called <code>contrib/demo/lucene-demo-{version}.jar</code>.
+</p>
+<p>
+Put both of these files in your Java CLASSPATH.
+</p>
+</section>
+
+<section id="Indexing Files"><title>Indexing Files</title>
+<p>
+Once you've gotten this far you're probably itching to go.  Let's <b>build an index!</b> Assuming
+you've set your CLASSPATH correctly, just type:
+
+<pre>
+    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}/src
+</pre>
+
+This will produce a subdirectory called <code>index</code> which will contain an index of all of the
+Lucene source code.
+</p>
+<p>
+To <b>search the index</b> type:
+
+<pre>
+    java org.apache.lucene.demo.SearchFiles
+</pre>
+
+You'll be prompted for a query.  Type in a swear word and press the enter key.  You'll see that the
+Lucene developers are very well mannered and get no results. Now try entering the word "string".
+That should return a whole bunch of documents.  The results will page at every tenth result and ask
+you whether you want more results.
+</p>
+</section>
+
+<section id="About the code..."><title>About the code...</title>
+<p>
+<a href="demo2.html">read on&gt;&gt;&gt;</a>
+</p>
+</section>
+
+</body>
+</document>
+