Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: Elasticsearch.

Elasticsearch: Difference between revisions

From MoodleDocs
Elasticsearch
Type Search engines, Elasticsearch
Set N/A
Downloads https://moodle.org/plugins/search_elastic
Issues https://tracker.moodle.org/browse/CONTRIB-6748
Discussion
Maintainer(s) Matt Porritt
No edit summary
No edit summary
Line 29: Line 29:


=== Installation ===
=== Installation ===
''NOTE:'' Complete all of these steps before trying to enable the Global Search functionality in Moodle.
'''NOTE:''' Complete all of these steps before trying to enable the Global Search functionality in Moodle.


1. Get the code and copy/ install it to: `<moodledir>/search/engine/elastic`
# Get the code and copy/ install it to: `<moodledir>/search/engine/elastic`
2. This plugin also depends on *local_aws* get the code from `https://github.com/catalyst/moodle-local_aws` and copy/ install it into `<moodledir>/local/aws`
# This plugin also depends on *local_aws* get the code from `https://github.com/catalyst/moodle-local_aws` and copy/ install it into `<moodledir>/local/aws`
3. Run the upgrade: `sudo -u www-data php admin/cli/upgrade` **Note:** the user may be different to www-data on your system.
# Run the upgrade: `sudo -u www-data php admin/cli/upgrade` **Note:** the user may be different to www-data on your system.
4. Set up the plugin in *Site administration > Plugins > Search > Manage global search* by selecting *elastic* as the search engine.
# Set up the plugin in *Site administration > Plugins > Search > Manage global search* by selecting *elastic* as the search engine.
5. Configure the Elasticsearch plugin at: *Site administration > Plugins > Search > Elastic*
# Configure the Elasticsearch plugin at: *Site administration > Plugins > Search > Elastic*
6. Set *hostname* and *port* of your Elasticsearch server
# Set *hostname* and *port* of your Elasticsearch server
7. Optionally, change the *Request size* variable. Generally this can be left as is. Some Elasticsearch providers such as AWS have a limit on how big the HTTP payload can be. Therefore we limit it to a size in bytes.
# Optionally, change the *Request size* variable. Generally this can be left as is. Some Elasticsearch providers such as AWS have a limit on how big the HTTP payload can be. Therefore we limit it to a size in bytes.
8. To create the index and populate Elasticsearch with your site's data, run this CLI script. `sudo -u www-data php search/cli/indexer.php --force`
# To create the index and populate Elasticsearch with your site's data, run this CLI script. `sudo -u www-data php search/cli/indexer.php --force`
9. Enable Global search in *Site administration > Advanced features*
# Enable Global search in *Site administration > Advanced features*


=== Elasticsearch Version Support ===
=== Elasticsearch Version Support ===

Revision as of 23:23, 23 July 2017

Moodle Global Search - Elasticsearch Backend Plugin

This plugin allows Moodle to use Elasticsearch as the search engine for Moodle's Global Search.

The following features are provided by this plugin:

  • Multiple versions of Elasticsearch
  • File indexing
  • Request signing, compatible with Amazon Web Services (AWS)
  • Respects Moodle Proxy settings
  • Image recognition and indexing
  • Webservices

Supported Moodle Versions

This plugin currently supports Moodle:

  • 3.1
  • 3.2
  • 3.3

Installation

NOTE: Complete all of these steps before trying to enable the Global Search functionality in Moodle.

  1. Get the code and copy/ install it to: `<moodledir>/search/engine/elastic`
  2. This plugin also depends on *local_aws* get the code from `https://github.com/catalyst/moodle-local_aws` and copy/ install it into `<moodledir>/local/aws`
  3. Run the upgrade: `sudo -u www-data php admin/cli/upgrade` **Note:** the user may be different to www-data on your system.
  4. Set up the plugin in *Site administration > Plugins > Search > Manage global search* by selecting *elastic* as the search engine.
  5. Configure the Elasticsearch plugin at: *Site administration > Plugins > Search > Elastic*
  6. Set *hostname* and *port* of your Elasticsearch server
  7. Optionally, change the *Request size* variable. Generally this can be left as is. Some Elasticsearch providers such as AWS have a limit on how big the HTTP payload can be. Therefore we limit it to a size in bytes.
  8. To create the index and populate Elasticsearch with your site's data, run this CLI script. `sudo -u www-data php search/cli/indexer.php --force`
  9. Enable Global search in *Site administration > Advanced features*

Elasticsearch Version Support

Currently this plugin is tested to work against the following versions of Elasticsearch:

  • 2.3.4
  • 2.4.4
  • 5.1.2
  • 5.5.0