PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Mod Submissions

Reply
 
Thread Tools
Old 04-16-2005, 04:35 AM   #1
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Change Weight per Keyword to Reorder Search Results

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:
Code:
'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):
Code:
iconv -f windows-1251 -t utf-8 -o ru-language.phpx ru-language.php &
Add the following to admin/index.php:
Code:
<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.
Attached Files
File Type: zip adjust_weights.zip (3.1 KB, 16 views)
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 04-22-2005, 02:09 PM   #2
GunMuse
Green Mole
 
Join Date: Feb 2005
Posts: 24
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 is offline   Reply With Quote
Old 05-02-2005, 04:23 PM   #3
GunMuse
Green Mole
 
Join Date: Feb 2005
Posts: 24
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.ph...haca+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
GunMuse is offline   Reply With Quote
Old 05-03-2005, 11:44 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Perhaps try the following in the config file:
Code:
define('APPEND_TITLE_META',false);
define('TITLE_WEIGHT',3);
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forcing a page to always show up first in search results based on keyword derrickp How-to Forum 3 02-22-2005 01:01 PM
Spidering returns very few keyword results e_talis Troubleshooting 8 07-22-2004 08:53 AM
How do I generate static search pages from keyword list? inthestars How-to Forum 4 04-11-2004 01:45 PM


All times are GMT -8. The time now is 05:27 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.