Indexing external database content

Author Message

Kedar Deshpande

Friday 14 August 2009 8:45:22 am

I am trying to index content from an external database and see the updatesearchindexsolr.php file has fields that allow connections to a DB but filling these in dont seem to work at all.

array( 'db-host' => "localhost",
         'db-user' => "root",
         'db-password' => "root",
         'db-database' => "cccms",
         'db-driver' => "mysql",
         'db-type' => "mysql",
         ...

Could someone let me know if indeed this is the way to provide the parameters for external DB indexing and also how to specify which tables within the external DB to index.

thanks.

Paul Borgermans

Saturday 15 August 2009 10:43:28 am

Hi Kedar

This script is used for indexing ez publish content only

There are several routes to index external data:

- write your own script(s), using the base classes in the ezfind extension
- configuring Solr to do this for you through the search backend:
see http://wiki.apache.org/solr/DataImportHandler and make a small script using the Solr base classes from the ezfind extension to control this DataImportHandler

In both cases, you will probably need to modify the Solr schema file

To search this content, you can use the ezfind supplied rawSolrRequest fetch function in templates

In a future edition, ez find will be extended to make indexing adn searching external content easier out of the box

Regards
Paul

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

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 19 2025 18:59:41
Script start
Timing: Jan 19 2025 18:59:41
Module start 'layout'
Timing: Jan 19 2025 18:59:41
Module start 'content'
Timing: Jan 19 2025 18:59:43
Module end 'content'
Timing: Jan 19 2025 18:59:43
Script end

Main resources:

Total runtime1.2195 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 589.1641152.6250
Module start 'layout' 0.00490.0025 741.789139.4609
Module start 'content' 0.00741.2107 781.2500526.8906
Module end 'content' 1.21810.0013 1,308.14068.1563
Script end 1.2194  1,316.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2446160.0002
Check MTime0.00130.1046160.0001
Mysql Total
Database connection0.00060.045410.0006
Mysqli_queries1.172696.1571540.0217
Looping result0.00050.0405520.0000
Template Total1.188797.520.5943
Template load0.00180.147620.0009
Template processing1.186997.326920.5934
Template load and register function0.00030.026410.0003
states
state_id_array0.00130.110510.0013
state_identifier_array0.00180.150120.0009
Override
Cache load0.00150.1195200.0001
Sytem overhead
Fetch class attribute can translate value0.00050.041420.0003
Fetch class attribute name0.00080.067630.0003
XML
Image XML parsing0.00320.260420.0016
class_abstraction
Instantiating content class attribute0.00000.000630.0000
General
dbfile0.00400.3265170.0002
String conversion0.00000.000740.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/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: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs