[BNM] Suggest in search - way of doing with MySQL?

paul perrin paul at idltd.com
Thu Oct 2 13:23:38 BST 2008


How about...

Store searches that people make (with a qualtiy index - numer of times used
and number of results returned maybe) - and on your search results page have
two sections 'similar popular searches', and actual results.

Given your example you could search your 'similar search terms' table for
'bananas', 'pajamas' etc and order them by number of matching words and
quality...

The table would not contain any actual results, just the text, the number of
times used and the number of results returned... if a user selects a
'similar search term' then the text is just fed into the main search.

Paul /)/+)

2008/10/2 Paul Silver <paul at tenpastmidnight.com>

> Hi,
>
> I'm making a search within a database driven site soon. We'd like to be
> able to suggest corrections or just show results for the suggestions if
> nothing is returned from a straight search.
>
> E.g. visitor searches for "bananas in pijamas"
>
> Results say: "No results for 'bananas in pijamas', would you like to
> search for 'banans in pyjamas'"
>
> Is there an easy way of doing this with PHP 5 & MySQL 5?
>
> Thanks
>
> Paul
> --
>  Paul Silver - tel: 01273 906020 or mobile: 07813 654285
>  Web Development: http://www.paulsilver.co.uk
>  Search Engine Promotion: http://webpositioningcentre.co.uk
>  Check your web pages: http://www.spidertest.com
>
> --
>
> BNM Subscribe/Unsubscribe:
> http://www.brightonnewmedia.org/options/bnmlist
>
> BNM powered by Wessex Networks:
> http://www.wessexnetworks.com
>


More information about the BNMlist mailing list. Powered by Wessex Networks