下载与elasticsearch版本相同的分词器插件。
然后放到elasticsearch的根目录中的plugins目录下。
然后重启启动elasticsearch
就能看的启动日志中有加载插件的日志
[2019-04-18T10:06:18,192][INFO ][o.e.n.Node ] [] initializing ...
[2019-04-18T10:06:18,327][INFO ][o.e.e.NodeEnvironment ] [ym33Dbv] using [1] data paths, mounts [[/home (/dev/mapper/VolGroup-lv_home)]], net usable_space [28.3gb], net total_space [30.4gb], types [ext4]
[2019-04-18T10:06:18,327][INFO ][o.e.e.NodeEnvironment ] [ym33Dbv] heap size [247.5mb], compressed ordinary object pointers [true]
[2019-04-18T10:06:18,328][INFO ][o.e.n.Node ] node name [ym33Dbv] derived from node ID [ym33DbvfTNGz8_FduAAzEA]; set [node.name] to override
[2019-04-18T10:06:18,329][INFO ][o.e.n.Node ] version[6.2.4], pid[31088], build[ccec39f/2018-04-12T20:37:28.497551Z], OS[Linux/2.6.32-642.el6.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_211/25.211-b12]
[2019-04-18T10:06:18,329][INFO ][o.e.n.Node ] JVM arguments [-Xms256m, -Xmx256m, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.Hqzk9fhG, -XX:+HeapDumpOnOutOfMemoryError, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Des.path.home=/home/els/elasticsearch, -Des.path.conf=/home/els/elasticsearch/config]
[2019-04-18T10:06:19,300][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [aggs-matrix-stats]
[2019-04-18T10:06:19,300][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [analysis-common]
[2019-04-18T10:06:19,301][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [ingest-common]
[2019-04-18T10:06:19,301][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [lang-expression]
[2019-04-18T10:06:19,301][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [lang-mustache]
[2019-04-18T10:06:19,301][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [lang-painless]
[2019-04-18T10:06:19,301][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [mapper-extras]
[2019-04-18T10:06:19,301][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [parent-join]
[2019-04-18T10:06:19,302][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [percolator]
[2019-04-18T10:06:19,303][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [rank-eval]
[2019-04-18T10:06:19,303][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [reindex]
[2019-04-18T10:06:19,303][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [repository-url]
[2019-04-18T10:06:19,303][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [transport-netty4]
[2019-04-18T10:06:19,303][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded module [tribe]
#这个就是加载的分词模块 [2019-04-18T10:06:19,304][INFO ][o.e.p.PluginsService ] [ym33Dbv] loaded plugin [analysis-ik]
[2019-04-18T10:06:22,903][INFO ][o.e.d.DiscoveryModule ] [ym33Dbv] using discovery type [zen]
[2019-04-18T10:06:23,939][INFO ][o.e.n.Node ] initialized
[2019-04-18T10:06:23,940][INFO ][o.e.n.Node ] [ym33Dbv] starting ...
[2019-04-18T10:06:24,329][INFO ][o.e.t.TransportService ] [ym33Dbv] publish_address {192.168.1.123:9300}, bound_addresses {[::]:9300}
[2019-04-18T10:06:24,359][INFO ][o.e.b.BootstrapChecks ] [ym33Dbv] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2019-04-18T10:06:27,463][INFO ][o.e.c.s.MasterService ] [ym33Dbv] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {ym33Dbv}{ym33DbvfTNGz8_FduAAzEA}{yfOuHVppRsCmebsRcWaPhA}{192.168.1.123}{192.168.1.123:9300}
[2019-04-18T10:06:27,475][INFO ][o.e.c.s.ClusterApplierService] [ym33Dbv] new_master {ym33Dbv}{ym33DbvfTNGz8_FduAAzEA}{yfOuHVppRsCmebsRcWaPhA}{192.168.1.123}{192.168.1.123:9300}, reason: apply cluster state (from master [master {ym33Dbv}{ym33DbvfTNGz8_FduAAzEA}{yfOuHVppRsCmebsRcWaPhA}{192.168.1.123}{192.168.1.123:9300} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
[2019-04-18T10:06:27,534][INFO ][o.e.h.n.Netty4HttpServerTransport] [ym33Dbv] publish_address {192.168.1.123:9200}, bound_addresses {[::]:9200}
[2019-04-18T10:06:27,534][INFO ][o.e.n.Node ] [ym33Dbv] started
[2019-04-18T10:06:27,538][INFO ][o.e.g.GatewayService ] [ym33Dbv] recovered [0] indices into cluster_state
使用kibana检查分词模块是否可用
QQ20190418-171924@2x.png
网友评论