Indexing content
DelayedIndexing
Indexing content in Solr can be a time-consuming operation and depending on the Solr index site it can have an impact on the publishing time. Therefore it's possible to delay content indexing by enabling [SearchSettings] DelayedIndexing in the global override "site.ini". The indexing operations will then be queued for deferred handling. To actually index the objects you will need to enable two cronjobs: ezfindexcontent and ezfoptimizeindex.
Cronjobs
The eZ Find cronjobs can be found in \ extension\ezfind\cronjobs of your eZ Publish root folder.
To optimize search functionality the ezfindexcontent cronjob must be executed frequently because objects published or modified between two executions of this cronjob will not be returned or up-to-date in search results. It is therefore wise to run it every five minutes. You can set the cronjob to run frequently by adding "Scripts[]=ezfindexcontent.php" to the CronjobPart-frequent section in an override of your cronjob.ini. The ezfindexcontent cronjob script can also be run manually from the root of your eZ Publish installation folder with the following command:
php runcronjobs.php -s <siteaccess> ezfindexcontent
The ezfoptimizeindex cronjob will optimize the Solr index so that Solr can handle search queries faster. Unlike the former this cronjob doesn't have to be executed very frequently, as optimizing is a heavy operation. Depending on how frequent content is published it can be done once or twice a day, or in very active sites every X hours. Therefore the suggested frequency is set to 'infrequent'. This cronjob can be run by the following command:
php runcronjobs.php -s <siteaccess> ezfoptimizeindex
For more information about configuring eZ Publish cronjobs visit the running cronjobs related documentation.
Note: After hiding a node the search index isn't updated instantly. For the changes to take effect the "frequent" cronjob needs to be executed, and Solr's search index needs to be updated.
OptimizeOnCommit
The OptimizeOnCommit setting controls the behaviour of the addObject and deleteObject calls with respect to optimizing the Solr index on commits. If the DelayedIndexing setting is enabled, the OptimizeOnCommit setting should be disabled in order to avoid useless optimization calls on commit during content indexing. This setting can be found in the [IndexOptions] section in your ezfind.ini.
Geir Arne Waaler (05/10/2011 4:11 pm)
Ricardo Correia (20/02/2013 12:21 pm)




Comments
There are no comments.