function search_install() db_sqlapi_install('search') end function search_schema() return { ['search_dataset'] = { ['fields'] = { ['sid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['type'] = {['type'] = 'varchar', ['length'] = 16, ['not null'] = ''}, ['data'] = {['type'] = 'text', ['not null'] = true, ['size'] = 'medium'}}, ['indexes'] = { ['sid_type'] = {'sid','type'}}}, ['search_index'] = { ['fields'] = { ['word'] = {['type'] = 'varchar', ['length'] = 50, ['not null'] = true, ['default'] = ''}, ['sid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['type'] = {['type'] = 'varchar', ['length'] = 16, ['not null'] = ''}, ['fromsid'] = {['type'] = 'int', ['unsigned'] = true, ['not null'] = true, ['default'] = 0}, ['fromtype'] = {['type'] = 'varchar', ['length'] = 16, ['not null'] = ''}, ['score'] = {['type'] = 'float', ['not null'] = ''}}, ['indexes'] = { ['from_sid_type'] = {'fromsid','fromtype'}, ['sid_type'] = {'sid','type'}, ['word'] = {'word'}}}, ['search_total'] = { ['fields'] = { ['word'] = {['type'] = 'varchar', ['length'] = 50, ['not null'] = true, ['default'] = ''}, ['count'] = {['type'] = 'float', ['not null'] = ''}}, ['primary key'] = {'word'}}} end