Improved Carsurvey.org Search

I’ve spent some more time working on the new search functionality:

  • Keywords in results are now highlighted as bold text
  • Matching fragments of reviews and comments are shown, rather than just the review summary text
  • Less results per page are shown, as each result tends to be larger due to the above changes
  • I’ve decreased the maximum limit of results from 200 to 100. This is to counteract the increased work load generated by matching the keywords and fragments

Much as I’m very impressed with MySQL Fulltext Searching, it doesn’t offer the facility (at least in Version 4) to extract the matching text from results sets. I’ve had to do it myself in PHP using regular expressions. Not a big deal, but it did feel a little like I was having to reinvent the wheel.

3 thoughts on “Improved Carsurvey.org Search

  1. Steven Post author

    Hi Sean,

    There’s no ordering of the results by the quality of the match, so pagination isn’t based on result quality. All matches are treated equally.

    For the pagination, I have a internal parameter for the number of results per page, and I just use a pretty standard quotient / remainder division to split the results into the correct number of pages. I then use the results of that calculation to output the correct rows of the search results on each page.

  2. Sean Nieuwoudt

    hi Steven,

    Was just curious. Been doing a substantial amount of research into improving fulltext searching. We’re busy with a search engine at the moment that will be putting it all to the test.

    “everyone has to re-invent the wheel at some point” 🙂

    Sean

Leave a Reply