Elasticsearch is a lightning quick open source search server. It’s java-based (but don’t let that scare you) and can index and search documents. If you want to know more about it, watch this excellent talk by Ben Corlett.
For a recent Laravel project I had to index some data. In the process I’ve created a small package to talk to Elasticsearch in a clean way.
Basically it provides:
- an interface that makes your objects searchable
- some easy to use functions to put those objects into the search index
- a function to retrieve search results from the index