Drupal multisite installation, multicore apache solr and apache solr multisite search

Events happening in the community are now at Drupal community events on www.drupal.org.
aleada's picture

Hi all,
I am new in apache solr technology and drupal integration.
I wan't to ask if is it possible to create the following configuration

Base site ( multisite search including results from site1 and site2 separate indexes )
www.example.com 

subdomain  site1 ( multi site installation with diff db + apache solr core1 index)
site1.example.com

subdomain  site2 ( multi site installation with diff db + apache solr core2 index)
site2.example.com

As i know the main concept for multisite search is the following configuration

Base site ( multisite search including results from a common site1 and site2 index )
www.example.com 

subdomain  site1 ( multi site installation with diff db + apache solr common core index)
site1.example.com


subdomain  site2 ( multi site installation with diff db + apache solr common core index)
site2.example.com

Thanks

Comments

It's basically the same

nick_vh's picture

It's basically the same setup, but in your subsites you need to do a little filter so only results from that specific site (read: faceted on hash).

I'm writing the code by heart so it could be that the function calls are not exactly correct.

//custom code for subsite 1, similar for subsite 2
hook_apachesolr_query_alter($query) {
  $query->addParam('hash', apachesolr_site_hash());
}

So, you do need to index in the same solr core/index but when searching you narrow your results to query on a subset of that index

Lucene, Nutch and Solr

Group organizers

Group categories

Projects

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: