eZ Community » Forums » Developer » eZFind: How do I specify an...
expandshrink

eZFind: How do I specify an individual Solr core for each site?

eZFind: How do I specify an individual Solr core for each site?

Wednesday 29 December 2010 4:40:34 am - 4 replies

I'm using an unique eZP installation to host two websites each one composed by three site access that share the same database. And I'd like to know how I can setup eZFind in order to use a different Solr core for each site. I already have running two cores and I've tried unsuccessfully tweaking the parameter solr.ini[SolrBase]SearchServerURI inside the respective siteaccess overrides, but appears that eZFind only accepts configuration files located under the override directory and those inside the extension. So this is limiting me to use only one core for all sites.

Any suggestions? Maybe it can be accomplished through the use of Solr Shards?

Modified on Wednesday 29 December 2010 4:44:58 am by Bayron Guevara

Wednesday 29 December 2010 10:18:27 am

I'm a bit surprised by this. The solr URI should be configurable at any level.

I'll give this setup a try, and I'll let you know.

On the other hand, remember that you can by default index completely different sites in the same solr index, as the (site specific) site ID will by default be used to filter out search results.

On a more generic note, we usually recommend not to use the same ezp setup for multiple sites unless they're actually related (common design items, for instance). If the websites are related, being able to run cross-site searches is actually a good option. If no relation exists, it is much easier to maintain the sites separately.

Wednesday 29 December 2010 4:23:35 pm

Thanks for your suggestions Bertrand. Yes, in my case the websites are related and for this reason I chose the same ezp setup. Now that I know than eZFind adds the SiteID in the search query, I prefer use the same Solr core.
But, still remains the issue related to the per siteaccess configuration of the solr.ini file. Please, update this ticket when you confirm this is true and I'll post a new issue in the eZ Publish tracker system.

Friday 26 July 2013 6:24:49 am

That is exactly the same issue I am facing right now! I am using one Development Siteaccess and one Staging and one Live and this is not nice that for every of them every time I had to change the value in extension!

any solution for that ?

Friday 26 July 2013 9:32:07 am

@Amir

 

1. If you are running command-line scripts to index your data, be sure to add the siteaccess-switching parameter to it, otherwise you will not be using per-siteaccess settings.

 

2. I know solr code does a bit of "aggressive" caching of ini files, saving pointers to the one it uses inside the eZSolr class. Maybe this is the cause of the problem - but if so I would expect it to be already known... In any case, if you can reproduce it, time for Jira!

 

3. otoh, by design, in eZ siteaccess settings have lower priority than extension settings. So if you want to put the url pointing to a different core in settings/siteaccess/XXX, you will probably have to comment out the 1 line in extension/ezfind/settings/solr.ini

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from