News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Safe to empty "smf_log_search_subjects" table if using Sphinx?

Started by MobileCS, August 06, 2017, 11:03:48 PM

Previous topic - Next topic

MobileCS

Is it safe to empty the "smf_log_search_subjects" table if I'm using Sphinx?

I'm assuming the entries in this table is from a long time ago when I had enabled "Custom index".

Arantor

I have a feeling SMF recreates it anyway. But you really should use the admin option to remove custom index rather than just pruning tables.
Holder of controversial views, all of which my own.


MobileCS

I looked for that first, but the option to delete the index is not showing. In fact, it says I don't have one (when I really do).


MobileCS

Actually even if I had the option, it doesn't appear it would work anyways.

The code to remove the custom search index is looking for the table "log_search_words" - which doesn't exist.

Sources/ManageSearch.php :


elseif (!empty($_REQUEST['sa']) && $_REQUEST['sa'] == 'removecustom')
{
checkSession('get');

db_extend();
$tables = $smcFunc['db_list_tables'](false, $db_prefix . 'log_search_words');
if (!empty($tables))
{
$smcFunc['db_search_query']('drop_words_table', '
DROP TABLE {db_prefix}log_search_words',
array(
)
);
}
...
...
}

Arantor

Holder of controversial views, all of which my own.


MobileCS

Yes of course, but it still doesn't exist.

After getting much needed sleep and looking at the code again, it appears the table is completely removed (DROP TABLE) when the custom index is deleted.

So that would explain why I don't see it.


Advertisement: