apachesolr_document_id

Versions
5
apachesolr_document_id($id, $type = 'node')
6
apachesolr_document_id($id, $entity = 'node')

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.

▾ 5 functions call apachesolr_document_id()

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

Code

contributions/apachesolr/apachesolr.module, line 143

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

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.