Fuzzy Searches

Fuzzy Searches

James Phillips -
回帖数:4
Is there any way to put entries the database and then search the entries in a "fuzzy" manner so that you get matches that are similar and not just matches that are identical (as in a google search, etc.)?
回复James Phillips

Re: Fuzzy Searches

David Scotson -

The best way is to avoid using a database at all and instead use search engine technology, as seen in Google and Yahoo. The best open source contender is Lucene, a java application that is widely ported and integrated with other languages.

At the moment PHP seems to be lagging behind other languages in their support for this technology, but the recent emergence of 2 seperate Web Service-enabled Lucene search engines may be the key to breaking through this barrier (though sadly this probably rules it out for most people running Moodle on standard commercial hosting, or at least increases the complexity greatly).

The second is more recent and more advanced.

The most readable introduction to the relevant technology is the On Search series written by Tim Bray.

However, given the lack of PHP-Lucene integration, and the portablity needs of Moodle it seems likely that lowest common denominator SQL methods will be the best available technology for the moment.

回复David Scotson

Re: Fuzzy Searches

James Phillips -
Thanks David. That's really helpful. I'd already tried to find something like Lucene but it is quite difficult wading through loads of stuff when you don't really know what you are looking for. It was quite an education though. Had no idea just how complex this technology was. The prices of some of the server-based search engine technology were also quite staggering. It was all news to me!