This plugin allows Moodle to use Microsoft Azure Search as the search engine for Moodle's Global Search.
The following features are provided by this plugin:
- File indexing
- Respects Moodle Proxy settings
This plugin currently supports Moodle:
- 3.1
- 3.3
- 3.4
- 3.5
To setup an Azure Search Service (and optionally a Microsoft Auzre account), follow the intructions at:
https://docs.microsoft.com/en-au/azure/search/search-create-service-portal
Calls to the Azure Search service require the service URL and an access key on every request. A search service is created with both, so if you added Azure Search to your subscription, follow these steps to get the necessary information:
- In the Azure portal, open the search service page from the dashboard or find your service in the service list.
- Get the endpoint at Overview > Essentials > Url. An example endpoint might look like
https://my-service-name.search.windows.net
. - Get the api-key in Settings > Keys. There are two admin keys for redundancy in case you want to roll over keys. Admin keys grant the write permissions on your service, necessary for creating and loading indexes. You can use either the primary or secondary key for write operations.
Once you have setup an Azure Search service you can now install the Moodle plugin.
To install the plugin in Moodle via the command line:
- Get the code from GitHub or the Moodle Plugin Directory.
- Copy or clone code into:
<moodledir>/search/engine/azure
- Run the upgrade:
sudo -u www-data php admin/cli/upgrade
Note: the user may be different to www-data on your system.
To install the plugin in Moodle via the Moodle User Interface:
- Log into your Moodle as an Administrator.
- Navigate to: Site administration > Plugins > Install Plugins
- Install plugin from Moodle Plugin directory or via zip upload.
Once you have setup an Azure Search service you can now configure the Moodle plugin.
- Log into Moodle as an administrator
- Set up the plugin in Site administration > Plugins > Search > Manage global search by selecting azure as the search engine.
- Configure the Azure Search plugin at: Site administration > Plugins > Search > Azure
- Set URL, API Key and API version of your Azure Search server
- Set the Index name you want to use for your Azure Search service.
- To create the index and populate Azure Search with your site's data, run this CLI script.
sudo -u www-data php search/cli/indexer.php --force --reindex
- Enable Global search in Site administration > Advanced features
This plugin provides optional file indexing support.
This plugin uses Apache Tika for file indexing support. This is a seperate service to this plugin and core Moodle.
Tika parses files, extracts the text, and return it via a REST API.
If you wish to use file indexing you will need access to a Tika service. An example setup can be found below.
Seting up a Tika test service is straight forward. In most cases on a Linux environment, you can simply download the Java JAR then run the service.
wget http://apache.mirror.amaze.com.au/tika/tika-server-1.16.jar
java -jar tika-server-1.16.jar
This will start Tika on the host. By default the Tika service is available on: http://localhost:9998
Once a Tika service is available the Azure Search plugin in Moodle needs to be configured for file indexing support.
Assuming you have already followed the basic installation steps, to enable file indexing support:
- Configure the Azure Search plugin at: Site administration > Plugins > Search > Azure
- Select the Enable file indexing checkbox.
- Set Tika hostname and Tika port of your Tika service. If you followed the basic Tika setup instructions the defaults should not need changing.
- Click the Save Changes button.
From the Apache Tika website:
The Apache Tika™ toolkit detects and extracts metadata and text from over a thousand different file types (such as PPT, XLS, and PDF). All of these file types can be parsed through a single interface, making Tika useful for search engine indexing, content analysis, translation, and much more. You can find the latest release on the download page. Please see the Getting Started page for more information on how to start using Tika.
This plugin was developed by Catalyst IT Australia:
Issues, and pull requests using github are welcome and encouraged!
https://github.com/catalyst/moodle-search_elastic/issues
If you would like commercial support or would like to sponsor additional improvements to this plugin please contact us: