You are here

function apachesolr_document_id in Apache Solr Search 6

Same name and namespace in other branches
  1. 8 apachesolr.module \apachesolr_document_id()
  2. 5.2 apachesolr.module \apachesolr_document_id()
  3. 6.3 apachesolr.module \apachesolr_document_id()
  4. 6.2 apachesolr.module \apachesolr_document_id()
  5. 7 apachesolr.module \apachesolr_document_id()

Generate a unique ID for an entity being indexed.

Parameters

$id: An id number (or string) unique to this site, such as a node ID.

$entity: A string like 'node', 'file', 'user', or some other Drupal object type.

Return value

A string combining the parameters with the site hash.

6 calls to apachesolr_document_id()
apachesolr_block in ./apachesolr.module
Implementation of hook_block().
apachesolr_delete_node_from_index in ./apachesolr.module
apachesolr_nodeapi_mass_delete in ./apachesolr.index.inc
apachesolr_nodeapi_mass_update in ./apachesolr.index.inc
apachesolr_node_to_document in ./apachesolr.index.inc
Given a node ID, return a document representing that node.

... See full list

File

./apachesolr.module, line 191
Integration with the Apache Solr search application.

Code

function apachesolr_document_id($id, $entity = 'node') {
  return apachesolr_site_hash() . "/{$entity}/" . $id;
}