You are here

function apachesolr_document_id in Apache Solr Search 8

Same name and namespace in other branches
  1. 5.2 apachesolr.module \apachesolr_document_id()
  2. 6.3 apachesolr.module \apachesolr_document_id()
  3. 6 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.

7 calls to apachesolr_document_id()
apachesolr_index_delete_entity_from_index in ./apachesolr.index.inc
Delete an entity from the index.
apachesolr_index_nodeapi_mass_delete in ./apachesolr.index.inc
Mass delete nodes from the solr indexer tables.
apachesolr_index_nodeapi_mass_update in ./apachesolr.index.inc
Mass Update nodes from the solr indexer table
apachesolr_search_block_view in ./apachesolr_search.module
Implements hook_block_view().
DrupalApacheSolrNodeAccess::testIndexing in apachesolr_access/tests/apachesolr_access.test
Tests indexing and check if it adds the correct grants for those specific users

... See full list

File

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

Code

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