# 执行https://www.elastic.co/guide/cn/elasticsearch/guide/current/_aggregation_test_drive.html中的例子时报错Fielddata is disabled on text fields ,只需要在查询的fields后面加上.kewwords即可
# 参考https://blog.csdn.net/u011403655/article/details/71107415/
def curl_es(data):
res = es.search(index="cars", doc_type="transactions", body=data)
print(res) body = {
"size" : 0,
"aggs" : {
"popular_colors" : {
"terms" : {
"field" : "color.keyword" #加上keyword就不报错了
}
}
}
}
curl_es(body)

python Fielddata is disabled on text fields的更多相关文章

  1. Fielddata is disabled on text fields by default. Set fielddata=true on [gender] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memor

    ES进行如下聚合操作时,会报如题所示错误: ➜ Downloads curl -XPOST 'localhost:9200/bank/_search?pretty' -d ' { "size ...

  2. (转载)es进行聚合操作时提示Fielddata is disabled on text fields by default

    原文地址:http://blog.csdn.net/u011403655/article/details/71107415 根据es官网的文档执行 GET /megacorp/employee/_se ...

  3. (转)es进行聚合操作时提示Fielddata is disabled on text fields by default

    根据es官网的文档执行 GET /megacorp/employee/_search { "aggs": { "all_interests": { " ...

  4. Kibana创建索引成功,但一直不显示出来(Fielddata is disabled on text fields by default. Set fielddata=true........)

    现象 把EFK整个集群搭建完成后,通过Kibana操作界面创建索引(如图1),我创建了lile-zabbix*的索引,显示是创建成功了,但是只要我在重新刷新一次,已经创建的索引就“消失了”.后通过查看 ...

  5. Elasticsearch 报错:Fielddata is disabled on text fields by default. Set `fielddata=true` on [`your_field_name`] in order to load fielddata in memory by uninverting the inverted index.

    Elasticsearch 报错: Fielddata is disabled on text fields by default. Set `fielddata=true` on [`your_fi ...

  6. Elasticsearch 6.2.3版本 string 类型字段 排序 报错 Fielddata is disabled on text fields by default

    背景说明 最近在做一个 Elasticsearch 的分页查询,并且对查询结果按照特定字段进行排序的功能. 但是执行结果却报错,报错信息如下: { "error": { " ...

  7. Elasticsearch 6.2.3版本 执行聚合报错 Fielddata is disabled on text fields by default

    背景说明 执行<Elasticsearch 权威指南>的示例,在执行聚合查询的时候,报错 Fielddata is disabled on text fields by default. ...

  8. elasticsearch报Fielddata is disabled on text fields by default

    我刚玩elk没几天,今天启动kibana之后执行查询看见elasticsearch报了一个错误 Caused by: java.lang.IllegalArgumentException: Field ...

  9. Kibana error " Fielddata is disabled on text fields by default. Set fielddata=true on [publisher] ..."

    Reason of this error:Fielddata can consume a lot of heap space, especially when loading high cardina ...

随机推荐

  1. [转]struct2 拦截所有没有登录的用户,强行转到登录界面AuthorizationInterceptor

    package com.sise.action;   import java.util.Map;   import com.opensymphony.xwork2.Action; import com ...

  2. Linux 文件与目录管理命令

    处理目录的常用命令 常见的处理目录的命令: ls: 列出目录 cd:切换目录 pwd:显示目前的目录 mkdir:创建一个新的目录,语法:mkdir [-mp] 目录名称 -m :配置文件的权限 -p ...

  3. Sql面试题之三(难度:简单| 含答案)

    Sql面试题之三(难度:简单| 含答案) 答案: .SELECT B.name, B.Depart T.Content FROM B, T WHERE ( T.Content = '税法培训' and ...

  4. 用node是踩过的一些坑

    1.http.request抓取数据时,response的“data”回调事件返回的数据不完整 问题原因:因为“data"事件返回是chunk,就是说是一块块连续的数据 解决的办法:在”da ...

  5. 当我们在安装tensorflow时,我们在安装什么?- Intro to TF, Virtualenv, Docker, CUDA, cuDNN, NCCL, Bazel

    (Mainly quoted from its official website) Summary: 1. TensorFlow™ is an open source software library ...

  6. kvm-1

    yum install libvirt* virt-* qemu-kvm* -y systemctl start libvirtd.service systemctl status libvirtd. ...

  7. 从pthread 到QThread

    该文出自:http://www.civilnet.cn/bbs/topicno/78430 使用线程技术进行应用编程的意义在gemfield的文章<从进程到线程>中已经介绍过了,我们就直奔 ...

  8. chrome & dark theme

    chrome & dark theme Dark Reader Extensions https://darkreader.org/help/en/ https://chrome.google ...

  9. Generator实质

    Generator实质 来源: <http://blog.liuwanlin.info/generatorshi-zhi/>  superlin •  September 15, 2015 ...

  10. BZOJ2460 [BeiJing2011]元素 【线性基】

    2460: [BeiJing2011]元素 Time Limit: 20 Sec  Memory Limit: 128 MB Submit: 1675  Solved: 869 [Submit][St ...