function fuzzysearch_schema in Fuzzy Search 6
Implementation of hook_schema().
File
- ./
fuzzysearch.install, line 11 - Install file for fuzzysearch module.
Code
function fuzzysearch_schema() {
$schema['fuzzysearch_index_queue'] = array(
'fields' => array(
'nid' => array(
'description' => 'The primary identifier for a node queued for indexing.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'module' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
'description' => "The module that added this nid to the queue.",
),
'timestamp' => array(
'description' => 'The Unix timestamp when the node was added to the queue.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'nid' => array(
'nid',
),
),
);
$schema['fuzzysearch_index'] = array(
'fields' => array(
'id' => array(
'description' => 'The ngram id.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'nid' => array(
'description' => 'The ngrams nid,',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'word_id' => array(
'description' => 'The word id.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'ngram' => array(
'description' => 'The ngram.',
'type' => 'varchar',
'length' => 6,
'not null' => TRUE,
'default' => '',
),
'completeness' => array(
'description' => 'Completeness.',
'type' => 'float',
'not null' => TRUE,
),
'score' => array(
'description' => 'Score.',
'type' => 'numeric',
'precision' => 8,
'scale' => 2,
'not null' => TRUE,
),
),
'indexes' => array(
'ngram' => array(
'ngram',
),
'completeness' => array(
'completeness',
),
),
'primary key' => array(
'id',
),
);
return $schema;
}