{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.atype_id] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.atype_id] please check that any required plugins are installed, or check the breaking changes documentation for removed settings",
"suppressed": [
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.id] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.name] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.package] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.rank] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.state] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.status] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
}
]
},
"status": 400
}

当出现   illegal_argument_exception 时候 意思是非法参数异常。也就是URI 缺少参数。在创建Elasticsearch的index 有一个 type (也就是Mysql数据中的表名), 在curl的时候没有输入这个type的话

就会报错

unknown setting [index.status] please check that any required plugins are installed, or check the breaking changes documentation for removed settings出现这个错误,这个错误就说明 你在插入数据的时候 不知道你要把你的这条数据插入到哪个表里面去,所以就报错了。类似于Mysql 因为要指定一张表的插入,不能随便插入不是。。。。

所以 正确的方法 URL 是

curl -H "Content-Type: application/json" -X PUT 'http://localhost:9200/index/type' -d

  

  

Elasticsearch PUT 插入数据的更多相关文章

  1. Elasticsearch教程(七) elasticsearch Insert 插入数据(Java)

    首先我不赞成再采用一些中间件(jar包)来解决和 Elasticsearch  之间的交互,比如 Spring-data-elasticsearch.jar 系列一样,用就得依赖它.而 Elastic ...

  2. 第五篇 elasticsearch express插入数据

    1.后端 在elasticsearch.js文件夹下添加: function addDocument(document) { return elasticClient.index({ index: i ...

  3. elasticsearch REST API方式批量插入数据

    elasticsearch REST API方式批量插入数据 1:ES的服务地址  http://127.0.0.1:9600/_bulk 2:请求的数据体,注意数据的最后一行记得加换行 { &quo ...

  4. 使用Hive或Impala执行SQL语句,对存储在Elasticsearch中的数据操作(二)

    CSSDesk body { background-color: #2574b0; } /*! zybuluo */ article,aside,details,figcaption,figure,f ...

  5. 使用Hive或Impala执行SQL语句,对存储在Elasticsearch中的数据操作

    http://www.cnblogs.com/wgp13x/p/4934521.html 内容一样,样式好的版本. 使用Hive或Impala执行SQL语句,对存储在Elasticsearch中的数据 ...

  6. 用elasticsearch索引mongodb数据

    参照网页:单机搭建elasticsearch和mongodb的river 三个步骤: 一,搭建单机replicSet二,安装mongodb-river插件三,创建meta,验证使用 第一步,搭建单机m ...

  7. 用Elasticsearch做大规模数据的多字段、多类型索引检索

    本文同时发布在我的个人博客 之前尝试了用mysql做大规模数据的检索优化,可以看到单字段检索的情况下,是可以通过各种手段做到各种类型索引快速检索的,那是一种相对简单的场景. 但是实际应用往往会复杂一些 ...

  8. python批量插入数据到es和读取es数据

    一.插入数据 1.首先准备类似如下数据 {"_type": "type1", "_id": 1, "_index": & ...

  9. 在ES批量插入数据超时时自动重试

    当我们使用ES批量插入数据的时候,一般会这样写代码: from elasticsearch import Elasticsearch,helpers es =Elasticsearch(hosts=[ ...

随机推荐

  1. WPF图片,DataGrid等实现圆角

    <Grid HorizontalAlignment="Center" VerticalAlignment="Center"> <Grid.Ro ...

  2. Revit二次开发 屏蔽复制构件产生的重复类型提示窗

    做了很久码农,也没个写博客的习惯,这次开始第一次写博客. 这个问题也是折腾了我接近一天时间,网上也没有任何的相关博文,于是决定分享一下,以供同样拥有此问题的小伙伴们参考. 内容源于目前在做的一个项目, ...

  3. PlayJava Day010

    今日所学: /* 2019.08.19开始学习,此为补档. */ 1.继承补充: ①不要仅为了获取其他类中某个功能而去继承,而是要有所属关系. ②Super关键字: a.代表父类对象的引用,且main ...

  4. contentOffset、contentSize和contentInset

    1.UIScrollView@property(nonatomic)CGPoint contentOffset;这个属性用来表示UIScrollView滚动的位置 @property(nonatomi ...

  5. gradle使用基础

    说明 介绍gradle使用基础,gradle基础脚本结构和常规使用方法,以及一个简单的gradle示例.主要是为了简单的介绍gradle使用. gradle环境配置 gradle可以通过两种方式运行g ...

  6. python字符减运算

    在C语言等高级语言中,字符之间的减运算都是支持的,但是python不然,在python中直接进行字符减运算是不被允许的. >>> print('c'-'a') Traceback ( ...

  7. [Go] 测试go连接imap的tcp长连接

    连接上imap服务后,什么都不操作,我测试大约5分钟会被服务端断掉,测试代码如下 imapClient, _ := client.Dial("imap.sina.net:143") ...

  8. [PHP] 内部接口简单加密验证方式

    1. 当有内部系统之间进行调用的时候,也需要简单的进行一下调用方的验证,一种简单的内部接口加密验证方式.此加密方式需要三个参数,分别是api地址,pin码,entry标识,其中pin和entry是接口 ...

  9. Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the serv

    z 此问题为时区问题,在 JDBC 的连接 url 部分加上 useSSL=true&serverTimezone=UTC 即可.如图

  10. linux 安装PostgreSQL12

    一.安装步骤 1.设置保存安装包的目录 # cd /usr/local/src 2.开始下载源包 # wget https://ftp.postgresql.org/pub/source/v12.1/ ...