Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Does Apache Solr separate searches with multiple sites on one server?
Does Apache Solr separate searches with multiple sites on one server?
Comments
Comment #2
jgrubb CreditAttribution: jgrubb as a volunteer commentedThere are a couple different ways of doing this. You could set up different indexes for each site, you could use a module like apachesolr_multisite and limit the searches to only that site, or you could write a couple hooks in a custom module that add a site_id field to the document in
hook_apachesolr_index_document_build_node()
and another to scope searches to just that site_id inhook_apachesolr_query_alter()
.Comment #3
Dru Pal CreditAttribution: Dru Pal commentedThanks that was very helpful.