[ToolKit] Search table and meta keyword optimization

phpBB SEO mods by phpBB SEO.

Moderator: Moderators

[ToolKit] Search table and meta keyword optimization

Postby dcz » Sun Nov 09, 2008 9:07 am

Search table and meta keyword optimization in phpBB3 :
    phpBB2 had a method to filter some unwanted word in its search system, phpBB3 has the same type of system, but unfortunately, it is not used.

    Re-activating the system has some great advantages such as running lighter search tables and outputting a lot more relevant meta keyword tags with our phpBB SEO meta tag mod (0.2.6 and above), without any impact on the display process.

    However, this filter system can only be re-enable for the Fulltext native indexing.
    People using the Fulltext mysql indexing will still be able to activate the check_ignore option of the phpBB SEO meta tag mod, by replacing :
    Code: Select all
    'check_ignore' => false,

    with :
    Code: Select all
    'check_ignore' => true,

    in includes/functions.php.
    Doing this will activate the stop word filtering when generating the meta tags, but will not change anything in the search tables.

    This being said, here is the method.

Activate search_ignore_words.php in Fulltext native indexing

    Open :
    Code: Select all
    includes/search/fulltest_native.php

    Find :
    Code: Select all
          // Split old and new post/subject to obtain array of 'words'
          $split_text = $this->split_message($message);
          $split_title = $this->split_message($subject);

    After add :
    Code: Select all
          // www.phpBB-SEO.com SEO TOOLKIT BEGIN - Enable search_ignore_words
          $this->filter_nums($split_text);
          $this->filter_nums($split_title);
          $this->get_ignore_words();
          $split_text = array_diff($split_text, $this->ignore_words);
          $split_title = array_diff($split_title, $this->ignore_words);
          // www.phpBB-SEO.com SEO TOOLKIT END - Enable search_ignore_words

    Find :
    Code: Select all
    }

    ?>

    Before add :
    Code: Select all
       // www.phpBB-SEO.com SEO TOOLKIT BEGIN - Enable search_ignore_words
       /**
       * Get rid of integers values in $input array
       */
       function filter_nums(&$input) {
          foreach ($input as $key => $word) {
             if (preg_match('`^[0-9]+$`', $word)) {
                unset($input[$key]);
             }
          }
       }
       // www.phpBB-SEO.com SEO TOOLKIT END - Enable search_ignore_words


    Once done, go to ACP, "MAINTENANCE" tab, "Search Index " menu, and start the Fulltext native index creation, after you eventually deleted it if required.

    This code will exclude all integers as well as all words listed in language/yourlang/search_ignore_words.php from the search index, and thus from your topic meta keywords tags.

Notes :
    Please note that you'll have to use the boards default language as your profile language in order to use the proper search_ignore_words.php file.

    It is useless to put integers in search_ignore_words.php, as well a words composed of less or more characters than the limits set in the phpBB search settings.
    By default, phpBB is excluding words of less than 3 and more than 14 characters.

    As well, only use lower case, the index is not case sensitive, so everything needs to be lower-case to be taken into account during the comparisons.


Support for this trick will be provided in this thread.

French speaking version.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21429
Joined: Fri Apr 28, 2006 9:03 pm

Advertisement

Postby kar » Sun Nov 09, 2008 9:15 pm

INHO, it's not good idea - remove numbers from search index and from keywords. For example text: Cup2008, New year 2009 etc.
IMHO this feature must be optionally.

Sorry my English.
kar
 
Posts: 9
Joined: Thu May 29, 2008 11:26 am

Postby SeO » Mon Nov 10, 2008 8:27 am

Well, keeping 100, 218, 334 is not very good either, at least in the general case.

Note that "Cup2008" would be kept as is with the above code, only pure digit "words" would be filtered.

You can though easily bypass the integer filter, just remove these two line in the above code :
Code: Select all
      $this->filter_nums($split_text);
      $this->filter_nums($split_title);


As well, remember that words of one and two letters are by default filtered by phpBB3, so "On the 12 of december" would only imply the indexing of "the" and "december".
So the integer filter would only concern integers of 3 or more digits in the default case (By the way I don't think that keeping words of two letters would be a good idea).

You could easily decide to only filter integers composed of more than 4 digit, to keep years, by replacing :
Code: Select all
         if (preg_match('`^[0-9]+$`', $word)) {


with :

Code: Select all
         if (preg_match('`^[0-9]{5,}$`', $word)) {


In the above code.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby IPB_Refugee » Sun Nov 23, 2008 6:42 am

Hello!

This is a small but very fine MOD - thank you! It already helped me to reduze the size of my search tables for some MBs. :)

Is it right that this MOD works completely independent from your SEO MODs? (If yes, it could also help people who do not want to install them.)

Have a nice Sunday and also many thanks for your update instructions for all of your SEO MODs! :D
Wolfgang
User avatar
IPB_Refugee
PR0
PR0
 
Posts: 82
Joined: Thu Jul 24, 2008 2:18 pm

Postby SeO » Sun Nov 23, 2008 9:48 am

Yes, it's fully independent.

You can even use the Meta tag mod and this mode without any other SEO mod from here.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Re: [ToolKit] Search table and meta keyword optimization

Postby wolkenkrieger » Sun Nov 23, 2008 8:37 pm

dcz wrote:[b][size=14]
People using the Fulltext mysql indexing will still be able to activate the check_ignore option of the phpBB SEO meta tag mod, by replacing :
Code: Select all
'check_ignore' => false,

with :
Code: Select all
'check_ignore' => true,

in includes/functions.php.


I can't find that code :(

Normally at wich line number could it be found?
wolkenkrieger
PR0
PR0
 
Posts: 77
Joined: Sat Nov 03, 2007 4:49 pm

Postby IPB_Refugee » Mon Nov 24, 2008 12:06 am

Hi wolkenkrieger,

in phpBB3-SEO-dynamic_meta_tagsV_0-2-6.txt - that 's the install instructions for Dynamic Metatags MOD - it is line 223. (It is an INLINE FIND.)

Regards
Wolfgang
User avatar
IPB_Refugee
PR0
PR0
 
Posts: 82
Joined: Thu Jul 24, 2008 2:18 pm

Postby wolkenkrieger » Mon Nov 24, 2008 1:36 am

[Edit]

Ok ... the premodded version is 0.2.2

i dosn't do the update to 0.2.6 - i'm waiting for the premodded 3.0.3 :)
wolkenkrieger
PR0
PR0
 
Posts: 77
Joined: Sat Nov 03, 2007 4:49 pm

Postby HB » Mon Nov 24, 2008 1:51 am

wolkenkrieger wrote: i'm waiting for the premodded 3.0.3 :)

http://downloads.phpbb-seo.com/seo-url- ... od-48.html
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1567
Joined: Mon Oct 16, 2006 2:25 am

Postby wolkenkrieger » Mon Nov 24, 2008 10:16 am

Oops :oops:

thx :)
wolkenkrieger
PR0
PR0
 
Posts: 77
Joined: Sat Nov 03, 2007 4:49 pm

Postby BlindDragon » Tue Jan 13, 2009 8:41 pm

After preforming the above, then deleting and reindexing, then clearing the cache

I still see the keywords from search_ignore_words.php - I checked this against your demo forum and these keywords are showing up there as well?

I am talking about 3 letter words like all, for, and

If possible I would like a way to eliminate 3 letter words or less instead of the 2 letter words or less that phpbb does by default.
User avatar
BlindDragon
 
Posts: 36
Joined: Thu Jan 08, 2009 12:57 pm
Location: Florida

Postby Cobra » Wed Jan 21, 2009 10:03 am

Activate search_ignore_words.php in Fulltext native indexing

I could not understand :( . how to activate this? and where is this search_ignore-words.php file.
Cobra
PR0
PR0
 
Posts: 50
Joined: Fri Aug 22, 2008 5:57 pm

Re: [ToolKit] Search table and meta keyword optimization

Postby IPB_Refugee » Wed Jan 21, 2009 10:39 am

Hello,

you can read how to activate the stopwords list in dzc's first post, right after

dcz wrote:Activate search_ignore_words.php in Fulltext native indexing


You find search_ignore_words.php in folder language/en/ respectively language/name_of_your_language (at least when a translation of this file is available for your mother tongue).

You also might want to add custom words to the list - looking at the search tables via phpMyAdmin or a similar tool is not a bad idea.

Good luck!
Wolfgang
User avatar
IPB_Refugee
PR0
PR0
 
Posts: 82
Joined: Thu Jul 24, 2008 2:18 pm

Postby Cobra » Wed Jan 21, 2009 8:44 pm

Thanks. working fine now.

But i think it will be better if first meta keyword place as a topic title. then the other. :D
Cobra
PR0
PR0
 
Posts: 50
Joined: Fri Aug 22, 2008 5:57 pm

Postby Cobra » Thu Jan 22, 2009 1:49 am

Code: Select all
<meta http-equiv="content-language" content="en-gb" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />


If i remove this from header.html will it help to indexing search engine?
Cobra
PR0
PR0
 
Posts: 50
Joined: Fri Aug 22, 2008 5:57 pm

Next

Return to phpBB SEO TooLKit

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 6 guests