| ||
![]() |
Searching Publications on Unix-like Operating Systems | |
|
This supplements Searching Publications on Windows with the changes necessary for running on Linux.
Packaging Bugapache-lenya-1.2.2-src.tar.gz includes lucene-1.3-final.jar and lucene-1.4.1.jar. Search will error:The method search(Query) in the type Searcher is not applicable for the arguments (Query, Sort)
unless you delete: lenya/WEB-INF/lib/lucene-1.3-final.jar. InstructionsThe Windows BAT file will not work on Linux. Create this shell file:FILE: /opt/apache-lenya-1.2.2/tools/bin/index-pubname.sh #! /bin/sh LENYAPUB=myPublicationName # LENYA_BUILD contains the "bin" and "pubs" directories. LENYA_BUILD=/opt/jakarta-tomcat-5.0.28/webapps/lenya/lenya/ ANT_HOME=/opt/apache-lenya-1.2.2/tools CLASSPATH=. ./ant -f $LENYA_BUILD/bin/crawl_and_index.xml -Dlucene.xconf=$LENYA_BUILD/pubs/$LENYAPUB/config/search/lucene-live.xconf index This assumes apache-lenya-1.2.2 was installed to the /opt directory. Adjust the filepaths and the publication id appropriately. chmod +x index-pubname.sh chown lenya:lenya index-pubname.sh This assumes user "lenya" runs Lenya. Adjust to your user. An IOException could be caused if the user cannot write to java.io.tmpdir (Issue was found on FreeBSD). FILE: /opt/apache-lenya-1.2.2/tools/bin/log4j.properties (Copy from Windows version.) Fix the server bug and create the publication files as in the Windows version. Add /opt/apache-lenya-1.2.2/tools/bin/index-pubname.sh to cron
|