I did a brief review of open source search index technology and found a couple new solutions not well-represented in the ol’ Google results so I thought I’d take a swing at it. First, let’s talk about my criteria:
- Open Source is a must. It needs an OSI-approved license.
- Needs to be easily deployable by not-professional DevOps (preferably to Digital Ocean if it matters).
- “Has Docker image” doesn’t check this box. Containerization is cool, but it needs to work for me if I need to mess with it.
- Functional requirements:
- Will be searching SQL-based data, especially varying length prose (like blogs & forums).
- Ability to tweak / weight search criteria beyond the prose contents is important.
- Does not need to search PDF. Maybe some day HTML, but it’s not important today.
- I prefer something that supports both apt and homebrew package managers.
- I prefer something that will easily integrate with the Laravel ecosystem. If it matters, I prefer a PHP-adjacent ecosystem.
- I prefer community-owned (or a foundation like Apache or Mozilla) over company-owned.
Let’s dive right in to what I found. These were the major contenders.
Apache Solr
When you ask for search, this is the one it seems everyone’s heard about. It’s enterprise-ready and fully open source forever under the Apache umbrella. “Ol’ reliable” of the search market. Downsides I hear are it’s a bit harder to wrangle without full-time devops because its Java-based configuration is a bit temperamental. You can apt-get install it on Digital Ocean, but it comes bundled with Tomcat and now you have two Java beasts to maintain. For an indie, this feels like a lot of overhead to take on, but it’s a solid backstop for any search index, uh, search. For PHP, there is comprehensive extension available for integration.
Sphinx
I’ve used this one a bit for quite a while, nearly a decade in fact. Its setup is a bit finicky but doable as a 1-person shop. Unfortunately, this project went closed-source for 3.0 and it appears effectively dead in open source. It turns out, a community sprung up and forked it (see Manticore below). The original here appears headed by a small company, which isn’t really what I was looking for. It’s absolutely SQL-first and reliably can produce good results; I know this first-hand. It has decent built-in support in PHP via an extension.
Elasticsearch
The former darling of the developer community found itself caught between a rock and a hard place and self-immolated its licensing by following Mongo down the Server Side Public License (SSPL) path. Sounds like a great product for businesses that don’t care. I am passing on it.
MeiliSearch
This came up late in my search and is improbably good. A brand-new search solution with an MIT license has sprung forth with 12K GitHub stars, Laravel integration (via Sail & Scout), a Digital Ocean image, Homebrew support, and an active community? How? I honestly don’t know, but I’m going to infer some things. Their website is devoid of a business plan or any way to give them money, but they appear to be employing quite a few folks full-time. That means VC, which means their vague desire to remain MIT is at best a wish dependent on further funding or profitability. If I was a fellow VC-funded startup it’s a compelling product. For my criteria, much less so, but still damn tempting.
Manticore Search
Forked from Sphinx in 2017, this is a true open source community project wedded to the GPLv2. While there is a business backing it, they don’t own the copyright and therefore no Contributor License Agreement in the world will let them wiggle out of the GPLv2 if they somehow got bought out. Ironically, this competitor appears to only exist due to paranoia on the part of Sphinx, which was a self-fulfilling prophecy it seems. It’s fairly active with recent releases, made a lot of improvements to Sphinx, and has support for the major package managers including Homebrew. It’s unclear if the PHP extension for Sphinx works for Manticore. It’s unclear how well it will play with Laravel using existing third-party tools. So, some possible integration woes ahead, but worth looking into, and probably where I’ll start.
What’s the scuttlebutt on search out there in developer land? Hit me up on Twitter or email below.