I have a search engine on my Laravel website, but it's quite dumb. It just uses WHERE column LIKE '%needle%' pattern, so it's actually a little useless for multiple words searching. What are current trends for searching? Are external APIs the best choice? If so, which ones?
By the way, I'm using InnoDB tables, because I love foreign keys.
Any search implementation that does not use a dedicated search tool is going to either be slow, or limited... if that weren't the case, there'd be no need for things like elasticsearch, solr, sphinx, et al.
But if you're really opposed to setting up a dedicated search appliance, your best bet would be something like this, which leverages the php version of lucene (the same library that powers solr): https://packagist.org/packages/nqxcode/laravel-lucene-search
@RoboRobok that package would be.. just that, a package. ElasticSearch, Solr, etc are whole other server process that you set up and run on your server, or a different server.
@RoboRobok I used it for a small project quickly developed with very limited trafic. For my purpose it worked well enough. I even query the model through an API with vue.js. Works ok.
But then yeah go for elastic search that is quite nice to use.
'Real' indexing services like Elasticsearch scale very well and are state of the art for full text searches. If you have to create a platform for anything more than a few users or private purposes this is definitely a recommended technology to use.
There are quite a few Elasticsearch packages out there for Eloquent.
I even released one my own not long ago https://github.com/Elodex/Elodex, the Quickstart tutorial should give you an idea how it works.
Another popular package would be Elasticquent which uses a little different approach than mine.
Yes you send JSON payload that are highly configurable. You get the opportunity to use AND or OR key words within the text value, you can precise the index and so on. Very useful and easy to use. Kind of scary when you see the doc though ;)