Elasticsearch Error:"Types cannot be provided in get mapping requests, unless include_type_name is

环境

ubuntu16、elasticsearch7.5.1

问题

索引新文档:

#索引:gb,类型:tweet,id:1
curl -H "Content-Type:application/json" -XPUT 'http://localhost:9200/gb/tweet/1' -d '
{
	"date":"2019-12-26",
	"name":"damon",
	"user_id":1001
}'

ES查看其映射:

curl -H "Content-Type:application/json" -XGET 'http://localhost:9200/gb/_mapping/tweet/?pretty'

提示ERROR:

"type" : "illegal_argument_exception",
"reason" : "Types cannot be provided in get mapping requests, unless include_type_name is set to true."

原因

ES7中剔除了映射类型(原因),查看映射时正确执行语句:

curl -H "Content-Type:application/json" -XGET 'http://localhost:9200/gb/_mapping/?pretty'

映射结果

 

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
《程序设计技术》(第三版)习题参考答案 习题1 一、单项选择题 DADDD BDCCD 二、填空题 ① 主 ② main ③ x=x*(x+b) ④ 普通、格式、分隔和转义 ⑤ 指定输出数据格式 ⑥ void main() ⑦ "how are you! " 三、阅读程序题 1. 9,11,9,10 2. 2,-1,-2 3. aa bb cc abc A 6 4. 2,2 5. 57 5 7 67.5864000,-789.124023 67.5864000, -7.89e+002 67,86, -789.12,67.5864000, -789.124023, 67.5864000, -789.124023 6.758640e+001, -7.89e+002 A,65,101,41 1234567,4553207,12d687 65535,177777,ffff,65535 COMPUTER, COM. 6. a + c = 102 a + c = f f + m = 17.950000 a + m = 17.650000 c + f = 102.300000 double = 1746.150019 四、程序设计题 //xt010401.cpp #include <stdio.h> #define PI 3.1415926 void main() { double r,h; printf("请输入半径r和高h:"); scanf("%lf,%lf",&r,&h); printf("圆半径: %lf\n",2*PI*r); printf("圆面积:%lf\n",PI*r*r); printf("圆球表面积:%lf\n",4*PI*r*r); printf("圆球体积:%lf\n",4.0/3*PI*r*r); printf("圆柱体积:%lf\n",PI*r*r*h); } //xt010402.cpp #include <stdio.h> void main() { int c; printf("Input a character:"); c=getchar(); printf("%c\t%d\n",c,c); } //xt010403.cpp #include <stdio.h> void main() { int x,y,h=30,f=90; x=(4*h-f)/2; y=(f-2*h)/2; printf("鸡:%d, 兔:%d\n",x,y); } //xt010404.cpp #include <stdio.h> #include <math.h> void main() { double a,b,c,s,area; printf("请输入三角形的三条边长(注意三条边长应能够构成三角形):"); scanf("%lf,%lf,%lf",&a,&b,&c); s=(a+b+c)/2; area=sqrt(s*(s-a)*(s-b)*(s-c)); printf("三角形的面积是: %lf\n",area); } //xt010405.cpp #include <stdio.h> void main() { double f,c; printf("请输入华氏温度:");

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值