Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Package com.RuntimeCollective.search.bean

The Search module uses Jakarta Lucene to provide a (hopefully) flexible search facility for Java objects.

See:
          Description

Interface Summary
Searchable A javabean must implement this interface to be searchable.
 

Class Summary
Search Represents a search query made by a user.
SearchCriterion One criterion to search by.
SearchResult A single search result.
SearchResults A collection of SearchResult objects, with methods to access them conveniently from a jsp
 

Package com.RuntimeCollective.search.bean Description

The Search module uses Jakarta Lucene to provide a (hopefully) flexible search facility for Java objects.


1. search.servlet.SearchInitialiserServlet

To use the Search module, add the following servlet to your web.xml:
<!-- Search Initialization Servlet --> <servlet> <servlet-name>searchInitialiser</servlet-name> <servlet-class>com.RuntimeCollective.search.servlet.SearchInitialiserServlet</servlet-class> <load-on-startup>3</load-on-startup> </servlet>
Add the following as a parameter to the com.RuntimeCollective.webapps.servlet.InitialiserServlet:
<init-param> <param-name>param.searchIndex</param-name> <param-value>/home/joe/tomcat/webapps/ROOT/lucene</param-value> </init-param>
specifying the location in the file system you'd like to store the Lucene search index in. This should be a directory, but does not have to exist - it will be created if not.

2. search.bean.Searchable

To make your class searchable, make it implement the Searchable interface. See the javadoc for details.

Example: ContentSiteLocation implements Searchable.

3. search.SearchIndex

Use the search index to add/remove Searchables from the index (with add/removeSearchable).

Example: ContentSiteLocation adds and removes CSLs from the search index

4. search.bean.Search

Use Search to perform searches, by adding SearchCriterion objects with the addCriterion method, then calling getResults.

Example: SearchAction performs a search.