Exciting times in MODX development are ahead. Last Friday, we released a new version of SimpleSearch which fully supports Solr-based searching. Solr is an Apache-based search platform from the Lucene project, and is absurdly fast and accurate in its search results. We made it a priority at MODX to get this functionality into our system, and now SimpleSearch has the ability baked right in.
The official docs for SimpleSearch, which can be found here, have a nice tutorial on how to setup Solr-based search for your MODX site. It’s a relatively painless process, especially if you already have a Solr instance already set up and running.
The Extra also packs in quite a few Settings to help you configure Solr just the way you like it:
This allows you to setup Solr in a myriad of different ways, such as with SSL, multi-core, or locked down in basic authentication.
Due to the OOP nature of MODX Revolution, getting Solr-search working was quite trivial. In SimpleSearch, the main class loads a custom Search driver class - which can be anything (meaning other search engines could be developed for SimpleSearch in the future besides just SQL and Solr) - which then has a few methods predefined for it. We just implemented the Solr functionality with the PHP Solr PECL package, changed a setting or two in SimpleSearch, and viola - Solr was active and working. For those curious, the Solr driver class can be found here, which extends the abstract base class, found here.
This is just one of the many, many features we’ve added to MODX in the past few months. And there’s plenty more to come!