天天看点

Elasticsearch Plugins前言概要

前言

Elasticsearch Plugins 是一种灵活的可自定义扩展 Elasticsearch 特性的机制

Plugins are a way to enhance the core Elasticsearch functionality in a custom manner. They range from adding custom mapping types, custom analyzers, native scripts, custom discovery and more.

大体可分为三类:Java plugins、Site plugins、Mixed plugins

  • Java plugins 这一类只包含 JAR 文件 ,并且集群中每一个节点都得安装,安装后都得重启才能生效
  • Site plugins 这一类包含一些 Javascript, HTML, 和 CSS 文件,可以直接在ES里使用,只要在一个节点上进行安装,也不必重启就有能生效,使用这种方式进行访问
http://yournode:9200/_plugin/[plugin name]
  • Mixed plugins 结合以上的两种特性

下面对 Elasticsearch Plugins 的安装与配置方法进行分享,详细可以参看 ES 的 官方文档

Tip: 当前的版本为 Elasticsearch 2.1.1

概要

Plugin管理

[root@h102 elasticsearch]# rpm -qa | grep elast
elasticsearch-2.1.1-1.noarch
[root@h102 elasticsearch]# rpm -ql elasticsearch-2.1.1-1.noarch | grep plugin
/usr/share/elasticsearch/bin/plugin
/usr/share/elasticsearch/plugins
[root@h102 elasticsearch]# /usr/share/elasticsearch/bin/plugin -h

NAME

    plugin - Manages plugins

SYNOPSIS

    plugin <command>

DESCRIPTION

    Manage plugins

COMMANDS

    install    Install a plugin

    remove     Remove a plugin

    list       List installed plugins

NOTES

    [*] For usage help on specific commands please type "plugin <command> -h"


[root@h102 elasticsearch]#            

复制