Skip to content
This repository has been archived by the owner on Jul 18, 2018. It is now read-only.

请问怎么设置默认的ik分词? #59

Closed
chenbotao828 opened this issue Mar 31, 2017 · 2 comments
Closed

请问怎么设置默认的ik分词? #59

chenbotao828 opened this issue Mar 31, 2017 · 2 comments

Comments

@chenbotao828
Copy link

在elasticsearch.yml添加index.analysis.analyzer.ik.type : “ik” 后出现如下提示:


Since elasticsearch 5.x index level settings can NOT be set on the nodes
configuration like the elasticsearch.yaml, in system properties or command line
arguments.In order to upgrade all indices the settings must be updated via the
/${index}/_settings API. Unless all settings are dynamic all indices must be closed
in order to apply the upgradeIndices created in the future should use index templates
to set default values.

Please ensure all required values are updated on all indices by executing:

curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
  "index.analysis.analyzer.ik.type" : "“ik”"
}'

然而在自动elasticsearch之后,curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{ "index.analysis.analyzer.ik.type" : "“ik”" 也没有用,提示:

$ curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
>   "index.analysis.analyzer.ik.type" : "“ik”"
> }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   445  100   395  100    50   5064    641 --:--:-- --:--:-- --:--:--  6269{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Can't update non dynamic settings [[index.analysis.analyzer.ik.type]] for open indices [[flask_reminders/di-2kgxaQuegxc6Qbo2P-Q]]"}],"type":"illegal_argument_exception","reason":"Can't update non dynamic settings [[index.analysis.analyzer.ik.type]] for open indices [[flask_reminders/di-2kgxaQuegxc6Qbo2P-Q]]"},"status":400}

谢谢了~

@medcl
Copy link
Owner

medcl commented Mar 31, 2017 via email

@wzyghb
Copy link

wzyghb commented Apr 2, 2017 via email

@medcl medcl closed this as completed Oct 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants