This could be a feature request, except that there is currently some unintended behavior that is at the least confusing, at the worst "buggy".

To recreate:
Create two cores (solr0, solr1)
Create an environment in Drupal apachesolr admin page for each core (solr, solr1)
Make both environments multisite
Set up both environments the same on another site

As a result, the multisite sites that are available to search, not search, exchange meta data, etc, are only provided for solr0/solr (the default environment, in other words). However, the solr0/solr multisite stuff is available for solr1/solr1, when at the least it shouldn't be.

Here is a sample use case:
User handling is super awkward, what with a separate apachesolr_user module, and apachesolr_views doesn't appear to allow for multi-field searching (why is it even there?). If I want to separate my user search into its own visual space on the page, I need to rig my own query and render in code and stick it in the template (or apachesolr_panels, or whatever). I've determined the best way to do that would be to create a separate environment that only targets users, and just on one site. On the other sites, it would be "read only". The other sites can't find a second environment, so I'm stuck.

Comments

mausolos created an issue. See original summary.

mausolos’s picture

Some notes as I chug along on this. The underlying problem appears to be that multsite relies on site_hashes to distinguish collections. The problem is, site_hash is provided by the core apachesolr module with apachesolr_site_hash(), which formulates the hash based solely on the site URL (as opposed to the env_id). I suspect that a true fix for this will involve changing that function as well.

mausolos’s picture

Title: No support for multiple cores/environments » Limited support for multiple cores/environments

Actually, everything seems to work okay, except that under Multisite tab it only lists the sites associated with the primary core/environment. Any additional environments that talk to different cores are not represented.