eZ Community » Learn » eZ Publish » eZ Find Demystified: Installing and...

eZ Find Demystified: Installing and configuring a multi-core Solr/eZ Find 2.6 instance with eZ Tika

Monday 14 May 2012 8:34:25 pm

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Step 7: Configure eZ Tika

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
 

Step 8: Activate the extensions

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
 

Step 9: Start up Solr

Before proceeding with this step, make sure that:

  • Your sites have some content that can be indexed
  • You have added some file attachments such as PDF’s, Word documents etc
  • The relevant content classes have their attributes marked searchable.
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

 
36 542 Users on board!

Tutorial menu

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)

Proudly Developed with from