documentation on bin/php/updatesearchindexsolr.php --db-host etc etc

Author Message

Geoff Bentley

Monday 22 March 2010 9:44:23 pm

Just wondering if there is any documentation of the correct usage for the eZ Find updatesearchindex script, especially:

  1. correct driver specification e.g mysql, ezmysql, ezmysqldb
  2. use with an existing siteaccess to override some parameters e.g host, db

I'm trying to feed a copy of a live db into Solr from a development environment.

Any help most appreciated.

Bertrand Dunogier

Tuesday 23 March 2010 3:06:53 am

Hmm, first, why don't you feed the live solr index with content from the live database ?

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Geoff Bentley

Tuesday 23 March 2010 12:52:43 pm

Because we're trialling a very complicated customised schema in Solr, which is not ready for prime-time.

Paul Borgermans

Tuesday 23 March 2010 2:34:25 pm

There is no additional documentation apart from the built in help

php extension/ezfind/bin/php/updatesearchindexsolr.php -help

The DB initialisationis done after the siteaccess, so in principle using the additional parameters should override it (not tested myself though)

About the "driver": you should use the same as the ini settings (the aliases), so mysql, ezmysql for example are synonyms and usable as long as the corresponding ini settings are set (look at the default site.ini shipped)

hth

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Bertrand Dunogier

Tuesday 23 March 2010 3:00:09 pm

@Geoff: what I would do is create a fake admin siteaccess for the remote instance, and run updatesearchindexsolr.php with the --siteaccess parameter. But be aware that if the binary files are not readable from the filesystem, they will not be indexed (if you use this feature).

Of course it would be better to consolidate the DB parameters, even though they will most likely work.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Geoff Bentley

Tuesday 23 March 2010 4:42:16 pm

Found one reason - code completely wrong in execute():

+++ updatesearchindexsolr.php (working copy)
@@ -449,7 +449,7 @@
{
if ( !empty( $this->Options[$param] ) )
{
- $optionString .= ' --' . $param . '=' . escapeshellarg( $this->Options['db-host'] );
+ $paramString .= ' --' . $param . '=' . escapeshellarg( $this->Options[$param] );
}
}

However, adding in the options causes the process to hang.

Geoff Bentley

Tuesday 23 March 2010 4:47:54 pm

The process was just taking its time (it had a lot to digest). Will submit this patch at http://issues.ez.no

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:21:15
Script start
Timing: Jan 18 2025 02:21:15
Module start 'layout'
Timing: Jan 18 2025 02:21:15
Module start 'content'
Timing: Jan 18 2025 02:21:15
Module end 'content'
Timing: Jan 18 2025 02:21:15
Script end

Main resources:

Total runtime0.6157 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.5547152.6875
Module start 'layout' 0.00520.0026 742.242239.5234
Module start 'content' 0.00790.6062 781.7656638.0234
Module end 'content' 0.61410.0016 1,419.789116.0703
Script end 0.6157  1,435.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.5090160.0002
Check MTime0.00140.2249160.0001
Mysql Total
Database connection0.00110.171010.0011
Mysqli_queries0.542288.0641730.0074
Looping result0.00080.1235710.0000
Template Total0.583494.820.2917
Template load0.00240.393920.0012
Template processing0.581094.358320.2905
Template load and register function0.00010.018710.0001
states
state_id_array0.00090.140510.0009
state_identifier_array0.00180.292020.0009
Override
Cache load0.00210.3413440.0000
Sytem overhead
Fetch class attribute can translate value0.00110.185530.0004
Fetch class attribute name0.00140.2342100.0001
XML
Image XML parsing0.00180.295830.0006
class_abstraction
Instantiating content class attribute0.00000.0052140.0000
General
dbfile0.00110.1845290.0000
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ol.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ol.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 8

Time used to render debug report: 0.0002 secs