PDA

View Full Version : Change Weight per Keyword to Reorder Search Results


Charter
04-16-2005, 04:35 AM
This mod is for v.1.8.7 and v.1.8.8 RC1. It allows you to adjust the keyword weights, which in turn will reorder the search results to your preference.

Add the following to your language pack:

'adjust_weights' => 'Adjust weights',
'merge_yes' => 'The engine table merge rows procedure is completed',
'merge_no' => 'No merge procedure was performed on the engine table',
'merge_none' => 'Be sure you have enough resources before doing this.',
'merge_title' => 'Merge Engine Table Rows',
'merge' => 'Merge',
'refine_msg1' => 'There were more than 100 results. Consider refining your search.',
'refine_msg2' => 'There were no results. Consider refining your search.',
'siteurl' => 'SiteURL',
'path' => 'Path',
'file' => 'File',
'keyword' => 'Keyword',
'spiderid' => 'SpiderID',
'keyid' => 'KeyID',
'weight' => 'Weight',

If you are using v.1.8.8 RC1 remember to convert the language pack to UTF-8 (here is an example - see UPGRADE.txt in the v.1.8.8 RC1 package for further details):

iconv -f windows-1251 -t utf-8 -o ru-language.phpx ru-language.php &

Add the following to admin/index.php:

<a href="adjust_weights.php"><?php print phpdigMsg('adjust_weights') ?></a><br/>

Unzip/FTP the attached file (ASCII mode) to the PhpDig admin directory.

Do not run the merge option unless you are absolutely sure that you have enough resources to do so. As always, make a database backup before running adjust_weights.php just in case.

You will be presented with various fields that you may search. Note that 'keyword' means one word, not key phrase. PhpDig weights per word so there is no key phrase weighting available.

Once you get results, you can set keyword weights anywhere from 1 (lowest) to 9999 (highest) and that will adjust the search results accordingly, highest showing first in the search results.

GunMuse
04-22-2005, 02:09 PM
Enough resources? That's a loaded question I have a Dual Xeon 2.8gig with 3 gig of Ram. Raid 5 hard drives . But what does enough mean? I have 9 million keywords in the db and over 30,000 pages. How much of a hang should I expect?

GunMuse
05-02-2005, 04:23 PM
Ok this isn't doing what I want to. I don't want to adjust the weight of individual pages I want to adjust the weight GIVEN to each of the pages.

Keyword in Title *.5 + Keyword in Metatag *.5 + Keyword density in body *. 5

That is what I am meaning.

Notice the problem I am seeing.

http://www.gunmuse.com/web_search.php?str=ithaca+model+485


VS

http://www.gunmuse.com/web_search.php?str=ithaca

Now why do I get NOTHING from "ithaca" and get good results from a 3 word search

Charter
05-03-2005, 11:44 AM
Perhaps try the following in the config file:

define('APPEND_TITLE_META',false);
define('TITLE_WEIGHT',3);