Browse Source

Adding apachesolr indexing

7.x-2.x
Jared Whiklo 10 years ago
parent
commit
5f0eb5b563
  1. 6
      islandora_apachesolr/islandora_apachesolr.info
  2. 15
      islandora_apachesolr/islandora_apachesolr.module

6
islandora_apachesolr/islandora_apachesolr.info

@ -0,0 +1,6 @@
name = Islandora Apache Solr Integration
description = A module which allows the Solr indexing and searching of Islandora resources.
core = 7.x
package = Islandora
dependencies[] = apachesolr
dependencies[] = uuid

15
islandora_apachesolr/islandora_apachesolr.module

@ -0,0 +1,15 @@
<?php
/**
* @file
* Islandora Apache Solr integration.
*/
/**
* Implements hook_apachesolr_index_documents_alter().
*/
function islandora_apachesolr_apachesolr_index_documents_alter(array &$documents, $entity, $entity_type, $env_id) {
if ($entity_type == 'node' && count($documents) > 0 && isset($entity->uuid)) {
$documents[0]->ss_uuid = $entity->uuid;
}
}
Loading…
Cancel
Save