I intend to show any row that contains at least one of the searched words, and in case of coinciding in several, that orders it from higher to lower number of coincidences.
I have found information about the Like wildcard with laravel, but I know that when using the Like wildcard the results returned by the search engine can be very high and totally irrelevant. that's why I'm looking for something similar to full Text- I have also found something of Angolia. but I do not want to use angolia
since, as I mentioned, I intend to search for any row that contains at least one of the searched words, and in case of coinciding in several, that orders it from higher to lower number of coincidences.
That's how I used to do it
ALTER TABLE coches ADD FULLTEXT (nombre, descripcion);
.
SQL="Select nombre, descripcion From coches Where Match(nombre, descripcion) AGAINST ('criterio');"
but in laravel how is it possible with Eloquent?