【问题标题】:Elasticsearch index creation errorElasticsearch 索引创建错误
【发布时间】:2014-02-03 10:07:43
【问题描述】:

我尝试为弹性搜索创建索引

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

但我总是收到以下错误:

{"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}

之前创建索引模板没有问题,但是我在网上找不到任何解决索引创建问题的方法。只有我发现我必须删除停用词过滤器。但没有文档说明如何做到这一点。

有人可以帮助我吗? 谢谢。

【问题讨论】:

    标签: lucene indexing elasticsearch


    【解决方案1】:

    听起来您定义了一个使用enable_position_increments 参数的索引模板。您可以通过检索所有索引模板来检查:

    curl localhost:9200/_template/*?pretty
    

    stopwords 过滤器中的 enable_position_increments 选项不再受支持,因为如果禁用它会产生损坏的令牌流。

    找到使用此设置的模板并将其更新为不再使用。

    【讨论】:

    • 6 小时后,弹性搜索愿意再次采用模板,然后它以某种方式工作。但是今天我放弃了配置它,因为我总是做一些事情,但没有我想要的。所有功能都是现有的文档,但现在如何处理它。而且我不是这部分的开发人员,所以开发人员回来后必须留下来......
    猜你喜欢
    • 1970-01-01
    • 2018-02-22
    • 1970-01-01
    • 1970-01-01
    • 2020-09-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-03
    相关资源
    最近更新 更多