Predicting / fixing full text search

I am working on a web application that has full text search functionality working without issue. I would like to improve on this and add a prediction / correction function to it, which means that if the user makes a typo or something that has 0 results, a corrected version of that input will be requested and the results will be returned. Basically something like a google function did you mean: x

.

Is there an easy way in Laravel to do this, or something useful for testing? I have been looking for this problem for a long time, but did not find anything suitable.

I am using Laravel 4.2 with a MySQL database if that matters.

+3


source to share


2 answers


In a case like this, I used elastic search for

You meant...?



Elastic search does a lot more than that, as it will sort the relevant results for many different cases and many more. You can use Elasticquent for Laravel, which implements elasticsearch to eloquent.

+1


source


There is nothing inside. I would look at the spell check integration first - there are several packages available in the package, although I don't know how well they do

https://packagist.org/search/?q=spell



At the second level, I am assuming that you can store searches in the DB and then do "People who searched for x also searched for y"

+1


source







All Articles