Build Your Own Arcade Controls Forum

Main => Forum/Website Discussion => Topic started by: RayB on February 18, 2005, 05:54:28 pm

Title: Search sucks
Post by: RayB on February 18, 2005, 05:54:28 pm
Would it be possible for the Admins to contact the forum's authors and complain to them about the horrible search function?

I searched for some terms, and as an example to you, one of the words was "old". Well I got back results for words CONTAINING "old" (such as fold, hold, gold, etc). That's just ridiculous. And the advanced search has no option to limit the search to whole words only.

Thanks!
Ray B.
Title: Re: Search sucks
Post by: sirwoogie on February 18, 2005, 10:10:18 pm
Actually, that was a setting I put in. Glad you like it so much ;)

Seriously, it was off due to a performance hit it takes on the search query. I played around with it, and I think I've cut the overhead down a bit. I've enabled the option so it will do whole word matches only.

Happy sailing
Title: Re: Search sucks
Post by: RayB on February 20, 2005, 02:03:16 pm
If you turn it off again and we add quotes to words, would it behave any differently?
Title: Re: Search sucks
Post by: sirwoogie on February 20, 2005, 07:06:06 pm
I turned it on, and I had to turn it back off. The cpu usage of mysql shot to 100% for a considerable length of time, and it slowed the overall system to much to be worth it. During testing it went faster, but when it's under heavy use, mysqld really takes a hit.

I'm not sure on the quotes.
Title: Re: Search sucks
Post by: RayB on February 20, 2005, 10:16:30 pm
That's weird (the cpu usage). Sounds like poor programming. All they (the forum coders) have to do is add a space in front of each keyword. That pretty much excludes all word "portions" when doing a string to string compare.

Oh well...
Title: Re: Search sucks
Post by: sirwoogie on February 21, 2005, 08:56:57 am
Unfortunately, it's not the forum software, it is the way mysql iterates through search criteria. The guys that wrote the forum software (mainly one developer in particular) are extremely proficient in PHP and SQL, so they've done as much as they can to tweak it out. The SMF software alone should attest to that (look at how fast this runs normally).
Title: Re: Search sucks
Post by: tommy on March 10, 2005, 03:23:40 pm
I have to agree with  rayb i was looking for a thread on the x arcade joy and all i got was words with x like pleXi and such , theres no point in seaching on there
Title: Re: Search sucks
Post by: sirwoogie on March 10, 2005, 06:41:19 pm
Well tell you what... I'll turn it back on and see what load we get. The first time I turned this on in production was during our /. flood and it tanked the server.
Title: Re: Search sucks
Post by: sirwoogie on March 10, 2005, 06:57:35 pm
You know what, never mind, I'm turning this back off. Turning this thing on just sucks. Using a search pattern of "testing" with it turned on takes approximately 45 seconds and 100% CPU for that duration. With the option turned off it takes 2.3 seconds and 80% of the CPU for that duration. Part of the issue with search was its long lag time to return... I think that far outweighs the need for exact matches. The only thing I can suggest is try to limit to a certain group and time period. Otherwise, you'll get false positives.
Title: Re: Search sucks
Post by: SirPeale on March 10, 2005, 07:31:45 pm
Can you explain exactly why exact words are so hard to pin down?  I have also had a real problem with searches due to some words being part of larger words.
Title: Re: Search sucks
Post by: sirwoogie on March 10, 2005, 08:10:50 pm
I don't know the exact reason for the slowdown, but I believe it's how MySQL iterates over word boundaries. Finding the exact design decisions on the SMF forums has been a little difficult to find. However, I believe if you preface a word with a '\' it will take it as literal and only return the root, not it's inclusion in other words.
Title: Re: Search sucks
Post by: tommy on March 10, 2005, 10:13:11 pm
I agree i wouldnt want to wait so long for the findings of the search , but if its going to turn up something im not looking for maybe its worth it , its up to the users i suppose.
Title: Re: Search sucks
Post by: Mojo2000 on March 15, 2005, 03:22:45 pm
I often like to look for messages by author, either for other members or for myself (e.g. checking responses to my last posts), but if I don't bookmark where I last went, then I feel as though I lose a thread forever!