Hi itzmie,
I just got another Idea additionally to the stopwords:
In ACP General Configuration you can set the "Minimum Word Length for Search Index" wich is 2 by default in the CF3. Maybe raising that to 4 or 5 letters would also optimize the index by just adding lesser words wich makes it smaller (and therefore faster).
Also go to your language folder (lang/<your basic forum lang>/search/stopwords.php) and add all the words that are just common in the language used in your forum. The search index could also cause problems if too common words like "and" "or" "is" "this" "that" etc. are added to the index too. Nobody searches for words like that but it blows up your Index a lot.
If there are posts in different languages in your forum I would also recommend to merge the stopword files also with the english one, so all common words from ALL used languages in your forum will be ignored. (For example here in the CBACK Community it would be the stopwords from german and english language combined). Please also copy that stopword file into ALL used language of your forum, so it is adapted to all users in your forum no matter wich language they individually use. (< sorry see my next correction post, the CF3 already does this automatically
)
But now to the recyclebin forum:
You could ignore that forum too if you recreate the search index now:
Open the file acp/classes/class_control.php
FIND
this code (in the public function indexing() section of that file):
Code
$DB->set_sql('SELECT COUNT(`post_id`) AS `count` FROM ' . POSTS);
$DB->execute();
$temp = $DB->fetch_assoc();
$posts = $temp['count'];
$DB->free();
require_once(PATH . 'classes/class_cback_search_indexer.' . EXT);
$SearchIndexer = new SearchIndexer();
if ( $start == 0 )
{
$Core->set_config('board_on', 0, true, false);
$SearchIndexer->drop_search_index();
}
$DB->set_sql('SELECT `post_id`, `post_subject`, `post_text` FROM ' . POSTS . ' ORDER BY `post_id` ASC LIMIT :1,:2');
$DB->execute((int)$start, (int)$step_count);
while ( $temp = $DB->fetch_assoc() )
{
$SearchIndexer->text_indexing($temp['post_text'], $temp['post_subject'], $temp['post_id']);
}
$DB->free();
REPLACE the code with the following:
Code
$DB->set_sql('SELECT COUNT(`post_id`) AS `count` FROM ' . POSTS . ' WHERE `post_depend_forum` NOT IN (1,2,3)');
$DB->execute();
$temp = $DB->fetch_assoc();
$posts = $temp['count'];
$DB->free();
require_once(PATH . 'classes/class_cback_search_indexer.' . EXT);
$SearchIndexer = new SearchIndexer();
if ( $start == 0 )
{
$Core->set_config('board_on', 0, true, false);
$SearchIndexer->drop_search_index();
}
$DB->set_sql('SELECT `post_id`, `post_subject`, `post_text` FROM ' . POSTS . ' WHERE `post_depend_forum` NOT IN (1,2,3) ORDER BY `post_id` ASC LIMIT :1,:2');
$DB->execute((int)$start, (int)$step_count);
while ( $temp = $DB->fetch_assoc() )
{
$SearchIndexer->text_indexing($temp['post_text'], $temp['post_subject'], $temp['post_id']);
}
$DB->free();
As you can see I added
two times(!!) this in the two queries:
WHERE `post_depend_forum` NOT IN (1,2,3)
the 1, 2, 3 would be all the forum_ids you want to ignore.
If your Recycle-Forum has the ID 20 it would look like that in both cases:
WHERE `post_depend_forum` NOT IN (20)
if you have two forums to ignore, lets say 20 and 73 it looks like this:
WHERE `post_depend_forum` NOT IN (20,73)
I hope this helps you a bit with reducing the index size!
Unfortunately you have to rebuilt again after that codechange. The index itself doesn't contain the forum_ids.
Sincerely,
Chris