function apachesolr_schema in Apache Solr Search 6
Same name and namespace in other branches
- 8 apachesolr.install \apachesolr_schema()
- 6.3 apachesolr.install \apachesolr_schema()
- 6.2 apachesolr.install \apachesolr_schema()
- 7 apachesolr.install \apachesolr_schema()
Implementation of hook_schema().
TODO: move all node indexing/seach code to apachesolr_search
File
- ./
apachesolr.install, line 104 - Install and related hooks for apachesolr_search.
Code
function apachesolr_schema() {
$schema['apachesolr_search_node'] = array(
'description' => t('Stores a record of when a node property changed to determine if it needs indexing by Solr.'),
'fields' => array(
'nid' => array(
'description' => t('The primary identifier for a node.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'status' => array(
'description' => t('Boolean indicating whether the node is published (visible to non-administrators).'),
'type' => 'int',
'not null' => TRUE,
'default' => 1,
),
'changed' => array(
'description' => t('The Unix timestamp when a node property was changed.'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'changed' => array(
'changed',
'status',
),
),
'primary key' => array(
'nid',
),
);
$table = drupal_get_schema_unprocessed('system', 'cache');
$table['description'] = 'Cache table for apachesolr to store Luke data and indexing information.';
$schema['cache_apachesolr'] = $table;
return $schema;
}