Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elasticsearch5.0 analysis-ik 5.0 使用DEMO 报错 #301

Closed
zuozhehao opened this issue Nov 3, 2016 · 15 comments
Closed

elasticsearch5.0 analysis-ik 5.0 使用DEMO 报错 #301

zuozhehao opened this issue Nov 3, 2016 · 15 comments

Comments

@zuozhehao
Copy link

错误信息
{ "error":{ "root_cause":[ { "type":"mapper_parsing_exception", "reason":"analyzer [ik_max_word] not found for field [content]" } ], "type":"mapper_parsing_exception", "reason":"analyzer [ik_max_word] not found for field [content]" }, "status":400 }

elasticsearch.yml 没做任何配置.
elasticsearch/plugins/ik 已存在

@medcl
Copy link
Member

medcl commented Nov 3, 2016

es安装完启动的信息发来看看

@zuozhehao
Copy link
Author

zuozhehao commented Nov 3, 2016

[2016-11-03T13:34:46,313][INFO ][o.e.n.Node ] [] initializing ...
[2016-11-03T13:34:46,510][INFO ][o.e.e.NodeEnvironment ] [RglhoT6] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [111.6gb], net total_space [125.8gb], spins? [possibly], types [ext4]
[2016-11-03T13:34:46,511][INFO ][o.e.e.NodeEnvironment ] [RglhoT6] heap size [1.9gb], compressed ordinary object pointers [true]
[2016-11-03T13:34:46,514][INFO ][o.e.n.Node ] [RglhoT6] node name [RglhoT6] derived from node ID; set [node.name] to override
[2016-11-03T13:34:46,518][INFO ][o.e.n.Node ] [RglhoT6] version[5.0.0], pid[11934], build[253032b/2016-10-26T04:37:51.531Z], OS[Linux/2.6.32-642.6.1.el6.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_111/25.111-b14]
[2016-11-03T13:34:48,071][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded module [aggs-matrix-stats]
[2016-11-03T13:34:48,071][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded module [ingest-common]
[2016-11-03T13:34:48,071][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded module [lang-expression]
[2016-11-03T13:34:48,071][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded module [lang-groovy]
[2016-11-03T13:34:48,071][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded module [lang-mustache]
[2016-11-03T13:34:48,072][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded module [lang-painless]
[2016-11-03T13:34:48,072][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded module [percolator]
[2016-11-03T13:34:48,072][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded module [reindex]
[2016-11-03T13:34:48,072][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded module [transport-netty3]
[2016-11-03T13:34:48,072][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded module [transport-netty4]
[2016-11-03T13:34:48,073][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded plugin [analysis-ik]
[2016-11-03T13:34:50,854][INFO ][o.e.n.Node ] [RglhoT6] initialized
[2016-11-03T13:34:50,855][INFO ][o.e.n.Node ] [RglhoT6] starting ...
[2016-11-03T13:34:51,170][INFO ][o.e.t.TransportService ] [RglhoT6] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2016-11-03T13:34:51,185][WARN ][o.e.b.BootstrapCheck ] [RglhoT6] max file descriptors [65535] for elasticsearch process likely too low, increase to at least [65536]
[2016-11-03T13:34:51,186][WARN ][o.e.b.BootstrapCheck ] [RglhoT6] max number of threads [1024] for user [elasticsearch] likely too low, increase to at least [2048]
[2016-11-03T13:34:54,298][INFO ][o.e.c.s.ClusterService ] [RglhoT6] new_master {RglhoT6}{RglhoT6KQJ2dyTy1UzTW8Q}{0ADko2v7QJuUrQREpj57kw}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2016-11-03T13:34:54,335][INFO ][o.e.h.HttpServer ] [RglhoT6] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}
[2016-11-03T13:34:54,335][INFO ][o.e.n.Node ] [RglhoT6] started
[2016-11-03T13:34:54,510][INFO ][o.e.g.GatewayService ] [RglhoT6] recovered [0] indices into cluster_state

@medcl

@medcl
Copy link
Member

medcl commented Nov 3, 2016

一共几个节点,都安装插件了没有

@medcl medcl closed this as completed Nov 3, 2016
@medcl medcl reopened this Nov 3, 2016
@zuozhehao
Copy link
Author

@medcl 我以为是我节点的问题,节点我全部删除了,除了ik 没其他插件。
[2016-11-03T13:34:48,073][INFO ][o.e.p.PluginsService ] [RglhoT6] loaded plugin [analysis-ik]
可以看到。。

@medcl
Copy link
Member

medcl commented Nov 3, 2016

你多少节点?安装完都要重启

@zuozhehao
Copy link
Author

1个节点,重启了

@medcl
Copy link
Member

medcl commented Nov 4, 2016

奇怪,你插件如何安装的?是解压到 plugins 下面 ik 目录么?

@chenyg0911
Copy link

我也是同样的问题。ES5.0.0。以前的版本要配置elasticsearch.yml,现在不用了吧?因为以前的配置方式改elasticsearch.yml会报错,启动不了。
[2016-11-08T13:12:18,427][INFO ][o.e.p.PluginsService ] [2j11bD1] loaded module [transport-netty4]
[2016-11-08T13:12:18,428][INFO ][o.e.p.PluginsService ] [2j11bD1] loaded plugin [analysis-ik]
[2016-11-08T13:12:18,428][INFO ][o.e.p.PluginsService ] [2j11bD1] loaded plugin [analysis-smartcn]
[2016-11-08T13:12:21,187][INFO ][o.e.n.Node ] [2j11bD1] initialized
[2016-11-08T13:12:21,187][INFO ][o.e.n.Node ] [2j11bD1] starting ...
[2016-11-08T13:12:21,351][INFO ][o.e.t.TransportService ] [2j11bD1] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}

@chenyg0911
Copy link

不好意思,我的能工作了。我测试插入数据前没有定义mapping。

@doubleflying
Copy link

请问 ES rtf 版本 什么时候升级到 5.0 ?

@liduo1997love
Copy link

Exception in thread "main" java.lang.IllegalStateException: 词典尚未初始化,请先调用initial方法
at org.wltea.analyzer.dic.Dictionary.getSingleton(Dictionary.java:137)
at org.wltea.analyzer.core.CJKSegmenter.analyze(CJKSegmenter.java:80)
at org.wltea.analyzer.core.IKSegmenter.next(IKSegmenter.java:116)
at org.wltea.analyzer.lucene.IKTokenizer.incrementToken(IKTokenizer.java:88)
at org.wltea.analyzer.sample.IKAnalzyerDemo.main(IKAnalzyerDemo.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

how to initial

@liduo1997love
Copy link

我想跑IKAnalzyerDemo

@liduo1997love
Copy link

我的版本是1.9.4

@medcl
Copy link
Member

medcl commented Dec 29, 2016

@liduo1997love 参照最新的测试代码和 restful 接口来测试就行了

@medcl medcl closed this as completed Dec 29, 2016
@CuiRicky
Copy link

我也遇到这个问题了,很奇怪,以前创建索引的时候还可以,现在就报跟你同样的错了,怎么解决的呢
我的创建脚本
curl -XPUT "http://192.168.1.216:9200/deals.info" -d '{
"settings": {
"number_of_shards": 2,
"number_of_replicas": 1
},
"mappings" : {
"info" : {
"properties" : {
"Id" : {"type": "keyword" ,"index": "not_analyzed"},
"DataType" : {"type": "integer" },
"CountryCode" : {"type": "text"},
"LangCode" : {"type": "text"},
"IsMobile" : {"type": "integer"},
"LinkAmount" : {"type": "integer"},
"CouponLinkAmount" : {"type": "integer"},
"DiscountTypeOrder" : {"type": "integer"},
"Discount" : {"type": "float"},
"Items" : {"type": "text",
"fields": {
"zh-cn": {
"type": "text",
"analyzer": "ik_max_word"
},
"en": {
"type": "text",
"analyzer": "english"
},
"ru": {
"type": "text",
"analyzer": "russian"
}
}
}
}
}
}
}
'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants