This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal
Monday 14 May 2012 8:34:25 pm
Out of the box eZ Tika amazingly requires no configuration, but since we have split off the binaries we need to update two files in each eZ Publish instance.
Edit the following files:
/var/www/ezpublish/ezfindexample1/extension/eztika/settings/binaryfile.ini.append.php
/var/www/ezpublish/ezfindexample2/extension/eztika/settings/binaryfile.ini.append.php
In the above files, update the TextExtractionTool setting under [HandlerSettings]:
TextExtractionTool=/srv/tika/bin/eztika
Now edit the following files:
/var/www/ezpublish/ezfindexample1/extension/eztika/settings/binaryfile.ini.append.withxpdf.php
/var/www/ezpublish/ezfindexample2/extension/eztika/settings/binaryfile.ini.append.withxpdf.php
In the above files, update the TextExtractionTool setting under [HandlerSettings]:
TextExtractionTool=/srv/tika/bin/eztika
In the same files, update the TextExtractionTool setting under [PDFHandlerSettings]:
[PDFHandlerSettings] TextExtractionTool=/srv/tika/bin/ezpdftotext
Edit the file /srv/tika/bin/eztika and update the TIKA_JAR variable:
TIKA_JAR=/srv/tika/bin/tika.jar
Edit the following files:
/var/www/ezpublish/ezfindexample1/settings/override/site.ini.append.php
/var/www/ezpublish/ezfindexample2/settings/override/site.ini.append.php
Under [ExtensionSettings], add the following in the order shown:
[ExtensionSettings] ActiveExtensions[] ActiveExtensions[]=eztika ActiveExtensions[]=ezfind
Regenerate autoloads and clear cache:
su – www-data cd /var/www/ezpublish/ezfindexample1/settings/override php bin/php/ezpgenerateautoloads.php php bin/php/ezcache.php –clear-all exit
Before proceeding with this step, make sure that:
NOTE: The default eZ Publish setting for the “file” attribute in the “File” class is NOT searchable! Make sure attributes using the “file” datatype are set to searchable before you start indexing or adding file attachments, otherwise you might spend hours trying to find out why eZ Find indexes your text fields but not your files. |
Now we are ready to start the Solr engine. For the first run we’re going to do it via a command line to check that everything is in order and to monitor the indexing process. Later we’re going to create a startup script to handle the stopping and starting of Solr.
Therefore, you should open up a separate terminal window and connect to your server to run Solr. After this, issue the following commands as root:
cd /srv/solr/java java -Dezfind -Dsolr.solr.home=/srv/solr/cores -server -d64 -Xmx768m -Xms768m -XX:+UseParallelGC -XX:+AggressiveOpts -XX:NewRatio=5 -jar start.jar
The parameters can be tweaked, and if you have little memory you can reduce the -Xmx768m and -Xms768m parameters to lower numbers, such as -Xmx256m -Xms256m.
If everything went well, you should see a cascade of output in the java terminal, ending with something like
2012-04-15 11:57:04.640:INFO::Started SocketConnector@0.0.0.0:8983