Fielddata is disabled on text fields by default 故障处理

在尝试对Elasticsearch中的文本字段进行聚合操作时,遇到'fielddata is disabled on text fields by default'错误。解决方法是修改字段映射,为需要聚合的文本字段设置'fielddata': true,或者使用keyword字段类型。这涉及到搜索和排序/聚合的不同数据访问模式,后者需要内存中的fielddata结构,而文本字段不支持doc_values,需要手动构建。
摘要由CSDN通过智能技术生成

在elasticsearch 中是进行聚合操作是,系统报错

"error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [tags] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."
      }

参考https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html#fielddata

fielddataedit
Most fields are indexed by default, which makes them searchable. Sorting, aggregations, and accessing field values in scripts, however, requires a different access pattern from search.
Search needs to answer the question "Which documents cont

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值