« Back to TribalWar
Thursday, February 8, 2007


I've been working on search for vBulletin extensively over the last week.

I have made notable improvements in the keyword search; I have moved to a search daemon called Sphinx which operates outside of MySQL and does not lock the post tables, which was a big problem. This allowed me to turn down the time between searched from 120 seconds to 5 seconds.

However, Sphinx could not deal with searches for threads or posts by user. It CAN do posts by user if you specify a keyword, but not everyone specifies a keyword.

Colosus and I decided searching threads started by user isn't the end of the world if we turn up the search time. This was increased to 20 seconds today to balance things out.

What I wanted to do next was allow searching for posts by a user, but only if they specified a keyword, so it would use Sphinx and not lock the post table. Searching the post table - which is several gigabytes in size and contains about 8 million posts - is a disaster. It can cause the site to lock up for anywhere from 1 to 10 minutes.

After looking at the code, I was unable to find where it determines when a search is made to find all posts by user without a keyword. I wanted to hardcode that out, then add javascript to the search form to tell users they MUST enter a keyword if they want to search the post table. Because I could not discern the two things apart in the vBulletin code, I disabled search for all posts by user completely for the time being. Search for all threads started by user is currently inefficient, but not bad enough to cause a problem (I think) so it is still working.

The next step is to talk to people who know more about vB search than I do and find out how to disable a search server side if it is for all posts by a user and does not contain a keyword. Right now, I can't tell.

Labels: ,

Submit to Digg! Submit to TribalWar

Posted by Rayn at 12:04 PM
 

Subscribe to Posts [Atom]