At our company we use this module quite extensively but we faced one issue related to the fact that the module always assumes the default apachesolr environment through this call:

$env_id = apachesolr_default_environment();

In projects like ours, where we have different environments per entity type, we lose the benefits of the module and it actually gets a bit confusing, since it also indexes every time on the default solr env_id given the above call.

Brainstorming a little bit, the ideal scenario would be that module fetches the correct solr enviromnents ids (could be more than one) per entity type and then prepare doc and call apachesolr_realtime_commit ...

Attaching a patch to this module that fixes the issue above described for entity insert/update and delete

Comments

brunocampos created an issue. See original summary.

brunocampos’s picture

Title: Index entities on the correct Solr index » Index entities on the correct Solr Environment
brunocampos’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
brunocampos’s picture

brunocampos’s picture

Status: Active » Needs review

Edit contribution

labboy0276’s picture

Status: Needs review » Reviewed & tested by the community

This patch works gloriously, thanks!

  • roborn committed e0d90e6 on 7.x-1.x authored by brunocampos
    Issue #2552669 by brunocampos: Index entities on the correct Solr...
roborn’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Committed. Thanks :)