Documentation
JavaDoc
Java documentation is made available online. Local copies may be produced by invoking the javadoc task with Apache Ant on the main directory.
API
The Lucene Web Service API documentation may be found on the wiki located at the Lucene Web Service development site. Local documentation is included with the distribution within the file "Lucene Web Service Documentation.doc".
Installation
Before we begin
To install Lucene Web Service you will need:
- Java JDK Installed (tested with 1.4.2 and 1.5)
- Apache Tomcat (tested with 5.5.17)
- Apache Ant (build targets tested with 1.6.5 and 1.7. Optional test suite requires 1.7)
- Knowledge of Tomcat and Java web applications (just JSPs and servlets, not EJBs).
Instructions
-
Setup Java, if you don't have it installed yet.
-
Install Ant and Tomcat as per their install instructions. Stop Tomcat if running.
-
Copy lucene-ws-1.0_01.war to $(TOMCAT)/webapps.
-
Configure the web service by editing web.xml inside the war file. Most of the default settings should be ok, but you will need to change the indices.directories init-param to specify the directories where you want Lucene indexes to reside. This directories are the parent directories of those that contain the index directories. For example, if you have an index at c:\data\index, then you would add "c:\data" to for this parameter. Lucene-WS will look into all the child directories of each directory in the parameter for a valid Lucene index.
Setting Description properties-file When present in initial parameters, service will replace all initial parameters with those contained within the file pointed to by the value. service.title The title of service. Defaults to "Lucene Web Service vX.X.X" service.defaultfield Provides a global default field to be used when searching. This value is only used as a last resort. indices.directories A comma-delimited list of directories within which will reside the indices. Left-most directories have higher priority than right-most. New indices are created in the left-most directory. service.debugging If true, a stack trace is appended to all exceptions thrown, providing valuable information. Create a index.properties for each index that you are exposing via Lucene-WS. This file goes in the same directory as the index files (i.e. the same directory as the segments file). The properties this file supports can be found here.
Start Tomcat and test the web service.
- Point your browser to "http://[host]:8080/lucene-ws-1.0_01".
That should be it -- now read the Lucene Web Service API documentation or check out the list of available libraries to find out how to use the lucene web service to index and search your documents.