Note: These tutorials are out of date, please see the Lemur Wiki instead.
Lemur Project Tutorials:
Starting Out
Installing & Compiling: LemurCGI and the Lemur GUI
Contents
Lemur CGI
The Lemur CGI is a CGI executable that runs under a HTTP server (web server) that allows access into indices and general search capabilities.
Beginning with version 4.3 of the Lemur Toolkit, the Lemur CGI is included as part of the site search package, and is built and installed by default on unix-like systems (linux, solaris, OS/X).
The CGI files will be installed in ${prefix}/share/cgi. Copy the contents of this folder to the location accessible via your webserver. Be sure that your webserver configuration will allow executables to be run. Consult your webserver documentation or system administator if you are uncertain how to ensure this.
Before the initial execution, edit the "lemur.config" file (which should stay in the same directory as lemur.cgi) to reflect your configuration.
Configuration Elements
The configuration file is a well-formed XML file with the opening tag <lemurconfig>. There are two required elements within the configuration file:
There is also some optional elements:
A sample configuration containing the above elements might look like:
<lemurconfig> <templatepath>./templates/</templatepath> <rootpaths strippath="true"> <path>/home/lemur/data/</path> </rootpaths> <supportanchortext>true</supportanchortext> <querylog>./logging/lemurlog.txt</querylog> <indexes> <index> <path>/home/lemur/indexes/sampleIndex</path> <description>Sample Lemur Index</description> </index> <index> <path>/home/lemur/indexes/sampleIndex_2</path> <description>A Second Sample Lemur Index</description> </index> </indexes> </lemurconfig>
Edit the file help-db.html to describe the contents of the text database(s) being searched by the Lemur search engine. You can describe the documents in whatever way you feel is most helpful to your users.
If you wish to use the default HTML templates, no modifications are necessary, but if you want to modify the HTML templates for your own uses, be sure to read the "README_Templates.txt" file for instructions on available commands that you can use within the templates.
The LemurCGI has several classes of functions that allows interactive access into an index. To see the list of functions and a description of what they do, in your web browser, execute "http://[your_path]/lemur.cgi?h=?" where [your_path] is the path (via http) to your lemur.cgi installation. See the online documenatation for more information.
To build from Microsoft Visual C++ .NET 2003 (Version 7.1):
- Install the lemur source code when running the lemur installer (choose custom)
- Open the Lemur.sln solution in the source directory
- Select the LemurCGI project.
- Select either Debug or Release mode.
- Right click the LemurCGI project and choose build.
- Copy the created executable (LemurCGI.exe, typically found in your C:\Program Files\Lemur\Lemur 4.4\src\lemur-4.4\site-search\cgi\Debug folder, or C:\Program Files\Lemur\Lemur 4.4\src\lemur-4.4\site-search\cgi\Release if built in release mode) along with the entire contents of the C:\Program Files\Lemur\Lemur 4.4\src\lemur-4.4\site-search\cgi\bin folder to the location accessible via your webserver. Be sure that your webserver configuration will allow executables to be run. Consult your webserver documentation or system administator if you are uncertain how to ensure this.
Lemur Index and Retrieval GUIs
|
There are two separate java GUIs for the lemur toolkit, one for indexing, and one for retrieval. The Lemur indexing and retrieval GUIs come in either precompiled executable JAR files (if you use the Windows installer) , or can be built from the java sources using the "--enable-java" flag; If you install the precompiled JAR files with the Windows installer, you should be able to double-click on the JAR file to execute it. If your system is not set up to automatically execute JAR files, you can start the GUI from the command line by issuing the command "java -jar LemurIndex.jar" for the indexing application or "java -jar LemurRetrieval.jar" for the retrieval application. Aside from executing the JAR, your system will also need to be able to find the JLemur and JLemurIndexing shared libraries. If you get the error "java.lang.UnsatisfiedLinkError: no JLemur in java.library.path", it means that the GUI cannot find JLemur.dll (on windows) or libJLemur.so (on Linux/Solaris). On windows, java looks for the shared library in the current path and in paths specified in your PATH environment variable. On Linux-based systems, it looks for the library in directories in your LD_LIBRARY_PATH environment variable. |
![]() Lemur Indexing GUI |
![]() |
![]() |
![]() |
| [Previous: Lemur Applications] | [Back to TOC] | [Next: Creating a Site-Search for Your Website] |
The Lemur Project
Last modified: June 21, 2007. 09:14:12 am





