【问题标题】:Elasticsearch: I have a date field and got the error: ‘Fielddata is disabled on text fields by defaultElasticsearch:我有一个日期字段并收到错误:'Fielddata 在默认情况下在文本字段上被禁用
【发布时间】:2020-01-23 22:45:35
【问题描述】:

在 Elasticserach 中,我有一个日期字段映射为日期,但在 Kibana 查询中出现错误:'Fielddata is disabled on text fields by default.'' on Kibana query。

完整的错误信息是: “默认情况下,在文本字段上禁用字段数据。在 [log_processed.time] 上设置 fielddata=true,以便通过反转倒排索引将字段数据加载到内存中。请注意,这可能会占用大量内存。或者使用关键字字段。”

字段 log_processed.time 是日期类型。我阅读了文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html 并了解这种类型的错误仅发生在文本字段中。

我尝试了 ignore_malformed:https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-malformed.html,但没有工作。

我用的是7.4.1版本的elastic。

谢谢。

【问题讨论】:

    标签: elasticsearch


    【解决方案1】:

    尝试使用“ignore_malformed”属性更新映射。 详细讨论:https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html

    【讨论】:

    • 我试过了,但没有用。我阅读了文档,“ignore_malformed”仅适用于未来的索引。如何应用于现有索引?
    • @Diogenes 你能找到这个问题的根本原因吗?如果是,它是什么以及它是如何解决的?
    猜你喜欢
    • 1970-01-01
    • 2017-05-19
    • 1970-01-01
    • 1970-01-01
    • 2018-04-02
    • 2023-03-30
    • 1970-01-01
    • 1970-01-01
    • 2018-03-08
    相关资源
    最近更新 更多