ElasticSearch-The number of object passed must be even but was [1]-问题解决
ES版本:6.4.3
1、The number of object passed must be even but was [1]
问题代码:
IndexRequest indexRequest = new IndexRequest(INDEX,TYPE,water.getId()).source(jsonStr);
解决:将jsonStr换成Map。
不报该错误了,但是又报错:
2、cannot write xcontent for unknown value of type class java.math.BigDecimal
解决:将6.4.3升级到6.7.2。
<es.version>6.7.2</es.version> <dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${es.version}</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>${es.version}</version>
</dependency>
ElasticSearch-The number of object passed must be even but was [1]-问题解决的更多相关文章
- ES添加文档 踩坑之 —— The number of object passed must be even but was [1]
读取文件,获取json格式的数据doc, 然后使用 bulkRequestBuilder.add(client.prepareIndex(index, type, id).setSource(doc) ...
- The number of object passed must be even but was [1]
1.失败,使用TransportClient public static void bulkInsert(TransportClient client) throws IOException { Li ...
- Javascript中类型: undefined, number ,string ,object ,boolean
var a1; var a2 = true;var a3 = 1;var a4 = "Hello";var a5 = new Object();var a6 = null;var ...
- [bug] Unrecognized token 'code': was expecting (JSON String, Number, Array, Object,'true', 'false' or 'null')
JSON格式有误,需用JSON.stringify()函数转换一下 参考 https://www.cnblogs.com/sunyanblog/p/13788740.html https://www. ...
- 记录一次Elasticsearch线上部署后出现:org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []的问题解决
说明:ES部署了3个节点,而一般情况只要这三个节点的IP其中一个都可以连接,Web端口使用的是9500,Client连接使用的是9600,调用程序使用了ES原生Client进行连接. 解决方法: 1. ...
- elasticsearch 导入基础数据并索引之 geo_point
elasticsearch 中的地理信息存储, 有geo_point形式和geo_shape两种形式 此篇只叙述geo_point, 地理位置需要声明为特殊的类型, 不显示在mapping中定义的话, ...
- elasticsearch-java异常
1. Unsupported major.minor version 52.0 java的jdk版本过低导致,需要更换为jdk1.8+ 2. elasticsearch 的version在pom中提示 ...
- SAP NUMBER RANGE维护配置object FBN1 Deletion only possible if status is initial
背景: 错误日志: SAP FBN1 Deletion only possible if status is initial 场景: 如果目标机已有NUMBER RANGE 不为0,需要删除配置年为9 ...
- Chapter 3 Discovering Classes and Object
Chatper 3 Discovering Classes and Object Exercises: 1.What is a class? A class is a template for man ...
随机推荐
- Vue.js(25)之 vue全局配置api介绍
本文介绍的全局api并不在Vue的构造函数内,而是在Vue构造器外面提供这些方法,让我们扩展新功能. 1. vue.extend(options) 参考:https://www.w3cplus.com ...
- ICE使用记录
在使用ice中间件的过程中 如果A继承了 ****Disp_类 在使用A类的时候 ****Disp_类会浅表克隆该类出一个新的对象a 在调用重写的接口的时候是使用a 在主动调用A类的对象的时候使用的才 ...
- WCF 异常 The server was unable to process the request due to an internal error.
实习用的C#,不搞.NET,但且记下. 只有标题中的错误提示,完全不知道哪里出错,要么是Oracle服务器.要么是服务程序,最不愿代码有问题. <behaviors> <servic ...
- 吴裕雄 Bootstrap 前端框架开发——Bootstrap 字体图标(Glyphicons):glyphicon glyphicon-adjust
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name ...
- Spring 事件(2)- 自定义事件
Spring 系列教程 Spring 框架介绍 Spring 框架模块 Spring开发环境搭建(Eclipse) 创建一个简单的Spring应用 Spring 控制反转容器(Inversion of ...
- 第七篇:Python3连接MySQL
第七篇:Python3连接MySQL 连接数据库 注意事项 在进行本文以下内容之前需要注意: 你有一个MySQL数据库,并且已经启动. 你有可以连接该数据库的用户名和密码 你有一个有权限操作的data ...
- vue学习(九)对象变更检测注意事项
Vue不能检测对象属性的添加和删除,要是必须这么做的话 需要使用 vue.$set() <body> <div id="app"> <h3> { ...
- 在MFC做DLL动态链接库时,使用boost,出现断言错误
建立的MFC DLL工程中有使用boost::thread,就会发生compile正常但是一程式执行或者直接编辑就出現ASSERT错误. 错误位置:dllinit.cpp,Line: 587,ASSE ...
- 18 react react-redux 的编写 TodoList
1. 安装 react-redux yarn add react-redux 2. react-redux 编写 TodoList 使所有子组件 都能使用 store #index.js import ...
- BGP联邦配置
BGP联盟建立: ①:启用BGP进程. ②:关闭同步与自动汇总. ③:router-id ④:公布自己所属联盟.——confederation identifier ID ⑤:表达自己的与其他对等(p ...