Forums / Developer / Indexing external database content

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