Indexing external database content

Indexing external database content

Friday 14 August 2009 12:07:08 pm - 7 replies

Modified on Friday 14 August 2009 12:07:17 pm by Kedar Deshpande

Author Message

Gaetano Giunta

Friday 14 August 2009 2:00:15 pm

Is this an external eZ Publish database that you want to index or an altogether different database from another application?

Principal Consultant International Business
Member of the Community Project Board

Jean-Bernard Valentaten

Tuesday 08 September 2009 5:26:00 am

Hi there,
I'm having exactly the same request as the original poster but cannot seem to find a solution to the problem.
I have an eZPublish based website with loads of content that is being perfectly indexed by eZFind.
Additionally I have two external datasources (databases) containing arbitrary data (non eZPublish-structured) that need to be indexed by eZFind and should be searchable in the eZPublish-based website.
So far I have already written extensions that provide fetch-operators for the external data. That step wasn't too hard to take, but how can I get that data indexed?
The eZFind overview page (http://ez.no/ezfind) states that it is possible to index external data, wherever it may come from, but I can't find any documentation about that aspect.
Does anyone have had experience considering external data?
Any hint is appreciated :)

/* No comment */

Carlos Revillo

Tuesday 08 September 2009 5:40:35 am

As a starting point, i would suggest this patch
http://issues.ez.no/IssueView.php?Id=15222&activeItem=1.
But i think it will only work if there is some kind of relation between your content objects and the data of the other database...

On the other hand, and please correct me if i'm wrong, i don't think that eZ Find can index external database if this database is not an ez one.

If you see the code at updatesearchindexsolr.php script, you will see that it starts by fetching eZ nodes for get attributes content and send them to the index.

But, if you have something like.
- and ezpublish database with their nodes and objects
- another database
- some kinda relation that tells you that your object_id 1000 needs data from some external dabase,

then you can index this data via the above patch.

Relating to doc, if you read carrefully, it says

eZ Find can not only search multiple eZ Publish sites, but external sites as well. The search index can be populated with information from all different types of websites using external plugins and XML importers

This is more logical. You can populate data to the index usign a custom php code, or maybe a developed module if your other site is Joomla, Drupal, OpenCMS... whatever.

Maybe the title of the article should be changed to avoid confussions...

Then, with ezfind you can get those results and know where they came from...

Best Regards.

Jean-Bernard Valentaten

Tuesday 08 September 2009 6:11:08 am

Hi Carlos,

thank you for the quick response. As you've already stated, using that patch I'll need a relation between the external data and some sort of content object. As far as I could see in the documentation of the patch that relation would be a specific content class, which I do not have as the data in question is totally outside of eZPublish, making it virtually impossible to trigger the virtual attribute the patch brings along. On the other hand I might just create dummy classes with the sole purpose of triggering the virtual attributes.
I'll try that one but if anyone has another idea, please keep posting :)

/* No comment */

Carlos Revillo

Tuesday 08 September 2009 6:21:12 am

Is the other database used by a CMS like Drupal or something?

If is not the case, maybe you can give a try to Zend Lucene Search [1] or usign Search component from eZ Components [2]

[1] http://ganeshhs.com/zend-framework/zend-search-lucene-part1
[2] http://www.ezcomponents.org/docs/api/trunk/introduction_Search.html

Jean-Bernard Valentaten

Tuesday 08 September 2009 7:13:00 am

Hi Carlos,

you just saved my day, thanks alot mate :)
The eZ Components Search is the winner, exactly what I was looking for *yay*

Cheers,
Jean

/* No comment */

Carlos Revillo

Tuesday 08 September 2009 7:26:37 am

Glad it helped. Good luck :).

You must be logged in to post messages in this topic!

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