Plugins

edit

Plugins

edit

Plugins are a way to enhance the basic elasticsearch functionality in a custom manner. They range from adding custom mapping types, custom analyzers (in a more built in fashion), native scripts, custom discovery and more.

Installing plugins

edit

Installing plugins can either be done manually by placing them under the plugins directory, or using the plugin script. Several plugins can be found under the elasticsearch organization in GitHub, starting with elasticsearch-.

Starting from 0.90.2, installing plugins typically take the form of plugin --install <org>/<user/component>/<version>. The plugins will be automatically downloaded in this case from download.elastic.co, and in case they don’t exist there, from maven (central and sonatype).

Note that when the plugin is located in maven central or sonatype repository, <org> is the artifact groupId and <user/component> is the artifactId.

For prior version, the older form is plugin -install <org>/<user/component>/<version>

A plugin can also be installed directly by specifying the URL for it, for example: bin/plugin --url file:///path/to/plugin --install plugin-name or bin/plugin -url file:///path/to/plugin -install plugin-name for older version.

Starting from 0.90.2, for more information about plugins, you can run bin/plugin -h.

Site Plugins

edit

Plugins can have "sites" in them, any plugin that exists under the plugins directory with a _site directory, its content will be statically served when hitting /_plugin/[plugin_name]/ url. Those can be added even after the process has started.

Installed plugins that do not contain any java related content, will automatically be detected as site plugins, and their content will be moved under _site.

The ability to install plugins from Github allows to easily install site plugins hosted there by downloading the actual repo, for example, running:

# From 0.90.2
bin/plugin --install mobz/elasticsearch-head
bin/plugin --install lukas-vlcek/bigdesk

# From a prior version
bin/plugin -install mobz/elasticsearch-head
bin/plugin -install lukas-vlcek/bigdesk

Will install both of those site plugins, with elasticsearch-head available under http://localhost:9200/_plugin/head/ and bigdesk available under http://localhost:9200/_plugin/bigdesk/.

Mandatory Plugins

edit

If you rely on some plugins, you can define mandatory plugins using the plugin.mandatory attribute, for example, here is a sample config:

plugin.mandatory: mapper-attachments,lang-groovy

For safety reasons, if a mandatory plugin is not installed, the node will not start.

Installed Plugins

edit

A list of the currently loaded plugins can be retrieved using the Node Info API.

Removing plugins

edit

Removing plugins can either be done manually by removing them under the plugins directory, or using the plugin script.

Removing plugins typically take the following form:

plugin --remove <pluginname>

Silent/Verbose mode

edit

When running the plugin script, you can get more information (debug mode) using --verbose. On the opposite, if you want plugin script to be silent, use --silent option.

Note that exit codes could be:

  • 0: everything was OK
  • 64: unknown command or incorrect option parameter
  • 74: IO error
  • 70: other errors
bin/plugin --install mobz/elasticsearch-head --verbose
plugin --remove head --silent

Timeout settings

edit

By default, the plugin script will wait indefinitely when downloading before failing. The timeout parameter can be used to explicitly specify how long it waits. Here is some examples of setting it to different values:

# Wait for 30 seconds before failing
bin/plugin --install mobz/elasticsearch-head --timeout 30s

# Wait for 1 minute before failing
bin/plugin --install mobz/elasticsearch-head --timeout 1m

# Wait forever (default)
bin/plugin --install mobz/elasticsearch-head --timeout 0

Known Plugins

edit

Analysis Plugins

edit

Supported by the community

River Plugins

edit

Supported by the community

Transport Plugins

edit

Supported by the community

Scripting Plugins

edit

Site Plugins

edit

Supported by the community

Misc Plugins

edit

Supported by the community