Moodle Search using Algolia PHP Client

Moodle is an open source LMS primarily written in PHP. 1

Recently, I started working on its Global Search API to plug them into Algolia using the PHP Client 2.

Source code is available on Github 3.

Would be great to have some feedback on the usage/implementation of the Algolia client.


Awesome @xan!

Would you like to explain a bit how Moodle works and how you designed the search to integrate with Algolia?

Looks like you have a plugin mecanism built into your system?

Already a quick question for you here, would it be able to leverage semver/composer to fetch the PHP Api Client when user installs it? It looks like the API Client is currently shipped along with the plugin.

Thrilled to hear more about your project!



Thanks for the interest @rayrutjes.

A while back I’d developed search APIs in Moodle core to be extended to be used with any search engine. At that time I’d chosen Solr. Over time, many users were finding it a bit difficult regarding the maintenance of an entire Solr server, etc. (Currently, Moodle gets shipped with Solr support in its core.) 1

Hence, the motivation towards integrating Algolia into the Moodle’s search. So that users, don’t have to worry about the additional server overheads.

Currently, there’s no Composer support for Moodle plugins hence I’d to ship the entire Algolia Client with it. Of course, this comes with the additional cost of making the plugin’s releases on Algolia Client’s releases.

Let me know if you have any more questions or feedback.

P.S.: Thanks for the Wordpress plugin @rayrutjes for frequently helping me with the flow and modelling of the plugin.