简体   繁体   English

Elasticsearch索引创建错误

[英]Elasticsearch index creation error

I try to create an Index for elasticsearch with 我尝试创建一个用于Elasticsearch的索引

curl -XPUT 'http://localhost:9200/myindex'

but I always got following error: 但我总是出现以下错误:

{"error":"IndexCreationException[[myindex] failed to create index]; nested: ElasticSearchIllegalArgumentException[[enable_position_increments: false] is not supported anymore as of Lucene 4.4 as it can create broken token streams. Please fix your analysis chain or use an older compatibility version (<=4.3) but beware that it might cause unexpected behavior.]; ","status":400}

The creation of the Index template before was no problem, but I cannot find anything how to solve the Index creation problem in Internet. 以前创建索引模板没有问题,但是我找不到如何解决Internet中索引创建问题的任何方法。 Only I found that I have to remove the stop words filter. 只有我发现自己必须删除停用词过滤器。 But no documentation how to do this. 但没有文档说明如何执行此操作。

Does anybody can help me? 有人可以帮助我吗? Thanks. 谢谢。

It sounds like you have an index template defined which is using the enable_position_increments parameter. 听起来您已经定义了使用enable_position_increments参数的索引模板。 You can check by retrieving all index templates: 您可以通过检索所有索引模板进行检查:

curl localhost:9200/_template/*?pretty

The enable_position_increments option in the stopwords filter is no longer supported because it produces broken token streams if disabled. stopwords过滤器中的enable_position_increments选项不再受支持,因为如果禁用,它将产生中断的令牌流。

Find the template that uses this setting and update it to no longer use it. 查找使用此设置的模板,并将其更新为不再使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM