Elasticsearch PUT 插入数据
{
"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 插入数据的更多相关文章
- Elasticsearch教程(七) elasticsearch Insert 插入数据(Java)
首先我不赞成再采用一些中间件(jar包)来解决和 Elasticsearch 之间的交互,比如 Spring-data-elasticsearch.jar 系列一样,用就得依赖它.而 Elastic ...
- 第五篇 elasticsearch express插入数据
1.后端 在elasticsearch.js文件夹下添加: function addDocument(document) { return elasticClient.index({ index: i ...
- elasticsearch REST API方式批量插入数据
elasticsearch REST API方式批量插入数据 1:ES的服务地址 http://127.0.0.1:9600/_bulk 2:请求的数据体,注意数据的最后一行记得加换行 { &quo ...
- 使用Hive或Impala执行SQL语句,对存储在Elasticsearch中的数据操作(二)
CSSDesk body { background-color: #2574b0; } /*! zybuluo */ article,aside,details,figcaption,figure,f ...
- 使用Hive或Impala执行SQL语句,对存储在Elasticsearch中的数据操作
http://www.cnblogs.com/wgp13x/p/4934521.html 内容一样,样式好的版本. 使用Hive或Impala执行SQL语句,对存储在Elasticsearch中的数据 ...
- 用elasticsearch索引mongodb数据
参照网页:单机搭建elasticsearch和mongodb的river 三个步骤: 一,搭建单机replicSet二,安装mongodb-river插件三,创建meta,验证使用 第一步,搭建单机m ...
- 用Elasticsearch做大规模数据的多字段、多类型索引检索
本文同时发布在我的个人博客 之前尝试了用mysql做大规模数据的检索优化,可以看到单字段检索的情况下,是可以通过各种手段做到各种类型索引快速检索的,那是一种相对简单的场景. 但是实际应用往往会复杂一些 ...
- python批量插入数据到es和读取es数据
一.插入数据 1.首先准备类似如下数据 {"_type": "type1", "_id": 1, "_index": & ...
- 在ES批量插入数据超时时自动重试
当我们使用ES批量插入数据的时候,一般会这样写代码: from elasticsearch import Elasticsearch,helpers es =Elasticsearch(hosts=[ ...
随机推荐
- 网上售卖几百一月的微信机器,Python几十行代码就能搞定
前言 文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理. 作者: 故事胶片 PS:如有需要Python学习资料的小伙伴可以加点击下方链 ...
- AppBoxFuture(九): 组织结构与权限体系
权限体系是用于约束用户访问或操作资源的权利,这里的"资源"可以指数据,也可以指特定的功能(如审核订单).通常的权限体系设计是基于角色的访问控制方式,用户通过角色与权限进行关联. ...
- Android Toolbar中的title居中问题
版权声明:本文为xing_star原创文章,转载请注明出处! 本文同步自http://javaexception.com/archives/167 Android Toolbar中的title居中问题 ...
- 解决vue中百度地图覆盖物引用本地图片问题
这次的主要目的是在百度地图中引用自定义的覆盖物,路径是再asset/images/文件夹下,直接引用出错.需要先导入再引用. 在<script></script>代码中增加如下 ...
- 推荐一下干货-------为什么你的app不耐看
直接上链接: 为什么你的app不耐看(上)https://www.ui.cn/detail/339252.html 为什么你的app不耐看(下)https://www.ui.cn/detail/423 ...
- requests---requests发送json数据类型
我们都知道post请求中的body有4种数据类型,今天我们来写一篇关于requests请求json这种数据类型. 数据类型 我们都知道post和get有个大的区别就是get没有body而post存在b ...
- Python3面向对象编程实例
/*认真研究完这个实例,理解python面向对象编程的方法*/class Person: """人员信息""" # 姓名(共有属性) nam ...
- selenium五十行代码自动化爬取淘宝
先看一下代码,真的只是五十行: # coding=gbk from selenium import webdriver import time options = webdriver.ChromeOp ...
- Pwnable-blackjack
游戏源码 http://cboard.cprogramming.com/c-programming/114023-simple-blackjack-program.html 打开之后是一个游戏 你有5 ...
- ffmpeg下载m3u8流媒体
安装 编译好的windows可用版本的下载地址(官网中可以连接到这个网站,和官方网站保持同步): http://ffmpeg.zeranoe.com/builds/ 该版本为FFMPEG的Static ...