Author | Topic |

Location: Perth
Registered: November 2002
|
The search functionality on this site!
|
Wed, 24 September 2003 11:54
|
 |
I dunno how easy this is to change, not being familiar with this forum's code and all, but it needs to be changed so that it doesn't ignore words of two characters or less! It's so annoying trying to do a search for say, '1g celica' and it ignores it, or 'f series' and ignoring again, when that's how people would say it in a post. Nark, is this just some routine in the search page you can comment out?
|
|
|

Location: Cabramatta, NSW
Registered: May 2002
|
Re: The search functionality on this site!
|
Wed, 24 September 2003 23:51

|
 |
Hmm.... Looking at search code written by someone else is one of the most horrible tasks imaginable... 
I'll see about it if I have any spare time.
|
|
|

Location: Perth
Registered: November 2002
|
Re: The search functionality on this site!
|
Thu, 25 September 2003 01:26

|
 |
If you can find the file that has the routine in it I can have a squiz at it. I imagine its just something like
$arr = explode(' ', $searchtext);
for($i=0; $i<count($arr); $i++){
if(strlen($arr[$i])<3){
//bugger off
return false;
}
}
or something like that that needs to be commented out. Or even if I could download this forum script from somewhere, is this freeware available? Can't say I've seen this forum in other places, always usually phpbb, ipb or vbulletin these days.
|
|
|

Location: Perth
Registered: November 2002
|
Re: The search functionality on this site!
|
Thu, 25 September 2003 01:28

|
 |
ah I see it is freely available, I'll download it tonight and have a play through it
|
|
|

Location: Cabramatta, NSW
Registered: May 2002
|
Re: The search functionality on this site!
|
Thu, 25 September 2003 06:14

|
 |
haha Better you than me! 
Thanks dude.
|
|
|

Location: melb
Registered: May 2002
|
Re: The search functionality on this site!
|
Thu, 25 September 2003 10:36

|
 |
I hate!!! the seach engine on this site. you know the info is there but it wont find it.
|
|
|

Location: Perth
Registered: November 2002
|
Re: The search functionality on this site!
|
Thu, 25 September 2003 13:37
|
 |
ok, here's the skinny. When you make a post the forum, it puts all the words greater then two characters, and less then 50 characters into a search database. To modify this you need to change a few lines of code, it's in numerous files, so my best suggestion is to download a program like EditPlus that can search through files. The line to search is this
"if ( strlen($w[$i]) > 50 || strlen($w[$i])<3 ) continue;"
and basically take out the OR
"if ( strlen($w[$i]) > 50) continue;"
Then you need to rebuild the search database, which is in the admin controls. This is the bit that will hurt, cause it will basically crawl through the entire post database, and it turns the forum off while it does, so not sure how long it would be down for 
Plus that will increase the sql database, tho really, if you think about the percentage of one or two character words in relation to longer words, I guess its not as much as you would first think.....
But anyway, that's how its done, I installed, modded and tested here and it works sweet as
|
|
|