I’m excited to announce the release of a major milestone for ElasticPress, version 3.0. The new version adds two critical pieces of functionality: user search and query integration as well as the new API making it possible: Indexables. The plugin has also been refactored to use modern PHP design patterns improving stability, maintainability, and extensibility. Version 3.0 is completely backwards compatible with older versions of ElasticPress.
Version 3.0 completely refactors the plugin to use Indexables. In the past, ElasticPress simply integrated with WordPress’s WP_Query API which enabled redirection of post queries through Elasticsearch instead of MySQL. Indexables take this a step further, enabling indexing, search, and querying on anything.
ElasticPress now ships with two built-in Indexables: Posts and Users. The Posts Indexable corresponds to the previous WP_Query integration. The Users Indexable adds support for WP_User_Query. This means you can now index site users and redirect user queries through Elasticsearch. In order to use the Users Indexable, you must be running WordPress 5.1 or higher, as this version added a necessary filter enabling ElasticPress to override the default MySQL query. Indexables open up a whole new world of possibilities for ElasticPress, and future versions will include Indexables for WordPress APIs such as WP_Term_Query and WP_Comment_Query. You can also create your own custom Indexables by extending the Indexable class.
As part of the 3.0 refactor, we’ve also rewritten the Feature Registration API. Instead of calling ep_register_feature, you now extend the Feature class. Starting now we are deprecating the old API although the plugin will remain completely backwards compatible.
We are excited to release this monumental new version of ElasticPress to the community. As always, please ask questions and report any bugs on GitHub.