Get the App
SLTechnology News&Howtos  ›  Servers  › 

Installation of IK word splitter

Shulou Source: shulou.com Published: 2022-06-02 22:32:15 10月02日 Update

Brief introduction:

The version of the current IK Segmentation package is 1.8.

Download the zip package.

Below is an attachment link [ik- installation package .zip], which can be downloaded.

Second, upload zip package.

Download and decompress, as shown in the following figure.

Cdn.sojson.com/file/16-03-01-02-26-18/doc/7386405912 ">

Open and modify it and make it into a zip package.

# 'elasticsearch.version' version of elasticsearch compiled against# You will have to release a new version of the plugin for each new# elasticsearch release. This version is checked when the plugin# is loaded so Elasticsearch will refuse to start in the presence of# plugins with the incorrect elasticsearch.version.# can change this version number to your corresponding version. If your version is 2.2.0, change it to 2.2.0elasticsearch.version=2.0.0/elasticsearch-2.0.0/plugins.

Upload it in the plugins/ directory and unzip it. Note here that the directory structure must be like this, as shown below:

Start the test

Well, we found that the report was wrong.

[elasticsearch@iZ25x3wjytdZ elasticsearch-2.0.0] $. / bin/elasticsearch [2016-03-01 10 INFO] [node] [Landslide] version [2.0.0], pid [11109] Build [de54438/2015-10-22T08:09:48Z] [2016-03-01 10 INFO] [node] [Landslide] initializing... Exception in thread "main" java.lang.IllegalStateException: Unable to initialize pluginsLikely root cause: java.nio.file.FileSystemException: / home/elasticsearch/es/elasticsearch-2.0.0/plugins/ik.zip/plugin-descriptor.properties: Not a directory at sun.nio.fs.UnixException. TranslateToIOException (UnixException.java:91) at sun.nio.fs.UnixException.rethrowAsIOException (UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException (UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.newByteChannel (UnixFileSystemProvider.java:214) at java.nio.file.Files.newByteChannel (Files.java:317) at java.nio.file.Files.newByteChannel (Files.java:363) at java. Nio.file.spi.FileSystemProvider.newInputStream (FileSystemProvider.java:380) at java.nio.file.Files.newInputStream (Files.java:108) at org.elasticsearch.plugins.PluginInfo.readFromProperties (PluginInfo.java:86) at org.elasticsearch.plugins.PluginsService.getPluginBundles (PluginsService.java:306) at org.elasticsearch.plugins.PluginsService. PluginsService.java:112) at org.elasticsearch.node.Node. (Node.java:144) At org.elasticsearch.node.NodeBuilder.build (NodeBuilder.java:145) at org.elasticsearch.bootstrap.Bootstrap.setup (Bootstrap.java:170) at org.elasticsearch.bootstrap.Bootstrap.init (Bootstrap.java:270) at org.elasticsearch.bootstrap.Elasticsearch.main (Elasticsearch.java:35)

We can see at a glance that he went to find the configuration file under plugins/ik.zip, right?

The solution is to delete the ZIP package.

Start again after deletion.

[elasticsearch@iZ25x3wjytdZ elasticsearch-2.0.0] $. / bin/elasticsearch [2016-03-01 10 INFO] [node] [Landslide] version [2.0.0], pid [11109] Build [de54438/2015-10-22T08:09:48Z] [2016-03-01 10 INFO] [node] [Landslide] initializing... Exception in thread "main" java.lang.IllegalStateException: Unable to initialize pluginsLikely root cause: java.nio.file.FileSystemException: / home/elasticsearch/es/elasticsearch-2.0.0/plugins/ik.zip/plugin-descriptor.properties: Not a directory at sun.nio.fs.UnixException. TranslateToIOException (UnixException.java:91) at sun.nio.fs.UnixException.rethrowAsIOException (UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException (UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.newByteChannel (UnixFileSystemProvider.java:214) at java.nio.file.Files.newByteChannel (Files.java:317) at java.nio.file.Files.newByteChannel (Files.java:363) at java. Nio.file.spi.FileSystemProvider.newInputStream (FileSystemProvider.java:380) at java.nio.file.Files.newInputStream (Files.java:108) at org.elasticsearch.plugins.PluginInfo.readFromProperties (PluginInfo.java:86) at org.elasticsearch.plugins.PluginsService.getPluginBundles (PluginsService.java:306) at org.elasticsearch.plugins.PluginsService. PluginsService.java:112) at org.elasticsearch.node.Node. (Node.java:144) At org.elasticsearch.node.NodeBuilder.build (NodeBuilder.java:145) at org.elasticsearch.bootstrap.Bootstrap.setup (Bootstrap.java:170) at org.elasticsearch.bootstrap.Bootstrap.init (Bootstrap.java:270) at org.elasticsearch.bootstrap.Elasticsearch.main (Elasticsearch.java:35)

We can see from startup that the IK splitter has been installed successfully.

[2016-03-01 10 INFO] [plugins] [Big Wheel] loaded [analysis-ik], sites [head]

Test:

Http://123.57.163.79:9200/_analyze?analyzer=ik&pretty=true&text=sojson online tools are really easy to use {"tokens": [{"token": "sojson", "start_offset": 0, "end_offset": 6, "type": "ENGLISH", "position": 0}, {"token": "online", "start_offset": 6 "end_offset": 8, "type": "CN_WORD", "position": 1}, {"token": "tools", "start_offset": 8, "end_offset": 10, "type": "CN_WORD", "position": 2}, {"token": "nice", "start_offset": 10 "end_offset": 12, "type": "CN_WORD", "position": 3}, {"token": "easy", "start_offset": 11, "end_offset": 13, "type": "CN_WORD", "position": 4}]}

Get the Over.

Download address of word splitter: http://down.51cto.com/data/2323000

Tags: Versions tools directories nice online testing success again online tools addresses files solutions profiles structures solutions links attachments ease of use configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL MariaDB Shulou Tech Info OPPO Reno Shulou Information