-<a href="http://jakarta.apache.org/lucene/">
<img border="0" alt="Lucene Logo" src="images/lucene_green_300.gif"/>
</a>
<h1>XML Search</h1>
<p>
Welcome to Cocoon XML Search. This page introduces Cocoon searching
and offers the following samples:
</p>
-<ul>
<li>Creating a Lucene index to enable searching
</li>
<li>Searching through a once created Lucene index using various means:
</li>
-<li>
Searching a Lucene index using
<em>SearchGenerator</em>
</li>
</ul>
<h2>Creating an Index</h2>
<p>
You must create a Lucene index first, before you can do the searching.
You can create a Lucene index either by crawling, or by using
LuceneIndexTransformer.
</p>
<h3>Creating Index By Crawling</h3>
-<p>
Create an index by specifying a base url from which to start
crawling (the indexer will follow the links to build its content).
The base url should be
<a href="http://cocoon.apache.org/2.1/userdocs/concepts/views.html">cocoon-view</a>
aware of content-labels
<strong>links</strong>
, and
<strong>content</strong>
.
For example you might use the base URL
<code>http://localhost:8888/docs/index.html</code>
</p>
-<p>
This following page allows you to
<a href="create">create</a>
an
index of all of Cocoon Sample pages.
</p>
-<p>
(There are many ways to add content to a Lucene index.
For an example of using the LuceneIndexTransformer, see the
<a href="../querybean/">QueryBean</a>
Sample).
</p>
<h2>Searching</h2>
<p>
If you have created a Lucene index, you can search the created index.
</p>
<h3>Searching Index</h3>
-<p>
Enter a query and search the Lucene index that you have created
- using the
<a href="http://cocoon.apache.org/2.1/userdocs/search-generator.html">Search Generator</a>
.
</p>
-<p>
-<form action="findIt" method="get">
<input type="text" name="queryString" size="20" value="lucene"/>
<input type="submit" value="Search"/>
</form>
</p>
<h2>Internals</h2>
-<p>
Cocoon XML search uses the
<a href="http://jakarta.apache.org/lucene/">Jakarta Lucene</a>
indexing and search engine.
The Cocoon documentation
<a href="http://cocoon.apache.org/2.1/userdocs/concepts/xmlsearching.html">explains</a>
how it is implemented within Cocoon. Look behind the scenes of this
example to find out more.
</p>
</content>