Closed (duplicate)
Project:
Apache Solr Search
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Jun 2010 at 02:22 UTC
Updated:
20 Apr 2011 at 14:17 UTC
see: http://drupal.org/node/823854
ideally we should have a more generic hook that can alter documented created from or related to a specific node.
For 6.x-1.x I'm not sure sure a change is in scope - we could basiclaly use hook_apachesolr_update_index() if we indicate that modules implementing it may need to check $document->entity to decide whether to act, and maybe pass $entity as an optional third parameter?
Comments
Comment #1
nick_vhI vote in favor and to change the apachesolr_entity_to_document while supplying this function with the name of the entity type.
The hook should be able to catch which entity type it is handling to properly get the fields which it needs to index.
This would make a more reusable approach.
(code example for D7)
Comment #2
pwolanin commentedFor Drupal 7, we have multi-entity indexing code that needs to be integrated. It's possible someone could backport that scheme if it works well.
Comment #3
pwolanin commentedComment #4
jpmckinney commentedDuplicate of what? Good practice to link to node which it is duplicate of, and to link that node back to this issue.
Comment #5
scor commented#966796: Separate indexer for multiple entity types