eZ Community » Forums » Extensions » eZ Find » Error on ezp multiple instances,...
expandshrink

Error on ezp multiple instances, sharing same siteaccesses & ezfind ?

Error on ezp multiple instances, sharing same siteaccesses & ezfind ?

Tuesday 27 September 2011 6:26:25 pm - 11 replies

Hello everyone !

I encounter a new problem with ezfind :

  • I have two ezpublish installations (one for dev one for production) on the same server
  • Siteaccesses are the same on both installations
  • When a website in dev & production is using ezfind then indexes and results are totally wrong :
    • When updating solr index on site A results are messed up on site B
    • When updating solr index on site B results are messed up on site A

I know eZFind uses a $site_id to identify siteaccess in database :

What data the $site_id used by ezfind to query solr's index relies on ? Is this $site_id only the siteaccess value or is it mixed with ezpublish DocumentRoot ?

How can i repair my problem ? For example is there a way to specify this $site_id on a per siteaccess basis to avoid such siteaccess confusions ?

Thanx in advance.

Modified on Tuesday 27 September 2011 6:27:16 pm by H-Works Agency

Tuesday 27 September 2011 10:29:09 pm

Hi,

ezfind relies on ezfind_site_id value in ezsite_data database table. You need to have different values in each db to separate data in index. 

Monday 03 October 2011 5:00:19 pm

Hello Ivo,

Thank you a lot for this. I was in big trouble with dev & production siteaccess messing up each other solr index.

Can i modify this value by hand or is there a specific method to do so ?

Monday 03 October 2011 5:19:50 pm

Hello Ivo,

Thank you a lot for this. I was in big trouble with dev & production siteaccess messing up each other solr index.

Can i modify this value by hand or is there a specific method to do so ?

It is just a md5 hash based  on time set by the extension if not set already.

So you can just put some random hash/number there: "INSERT INTO ezsite_data ( name, value ) values( 'ezfind_site_id', '1234567890' )" and reindex everything again

Monday 03 October 2011 5:28:47 pm

Ok great.

Do i have to setup for each site the "SiteNameList" in ezfind.ini or is it only if you need the ezfind installation to search on multiple site ?

Monday 03 October 2011 6:02:22 pm

Ok great.

Do i have to setup for each site the "SiteNameList" in ezfind.ini or is it only if you need the ezfind installation to search on multiple site ?

This is only to create installation facets if you search across multiple site. You don't need this if every site searches its own index.

Thursday 06 October 2011 11:18:58 am

Ok thank you for that information.

I have a question about the ezfind_site_id :

When is it inserted in database ?

Why some sites using ezfind haves it and not others ?

Modified on Thursday 06 October 2011 1:13:37 pm by H-Works Agency

Thursday 06 October 2011 1:21:28 pm

Ok thank you for that information.

I have a question about the ezfind_site_id :

When is it inserted in database ?

Why some sites using ezfind haves it and not others ?

It is inserted first time you run index AFAIK

Didn't check, but all my ezfind installation have it happy.gif Emoticon Really don't know the answer for that. Would be good to hear Paul on this matter...

Thursday 06 October 2011 1:33:51 pm

Ok thank you Ivo i'll post my progress back here :p

Thursday 06 October 2011 1:39:20 pm

Hello

ezfind_site_id is inserted upon indexing when it does not exist yet in the database, so normally the first object that gets indexed will generate this ID. All subsequent calls will then get it from the database (though cached in the ezsolr object when called multiple times in a row as during re-indexing your entire site).

hth

Paul

Thursday 06 October 2011 2:51:54 pm

Ok thank you Paul for taking the time to respond.

Monday 14 November 2011 5:39:25 pm

Ok solr/ezfind works great, i was having a problem with $site_id...be carefull when copying databases to deploy new websites !

Modified on Thursday 24 November 2011 6:06:00 pm by H-Works Agency

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from