elasticsearchThe number of object passed must be even but was [1]

Posted 九师兄

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了elasticsearchThe number of object passed must be even but was [1]相关的知识,希望对你有一定的参考价值。

在这里插入图片描述

1.概述

The number of object passed must be even but was [1]

ES 在调用 setSource 的时候传入 Json 对象后会报错:The number of object passed must be even but was [1],此时可以推荐将 Json 对象转为 Map 集合,或者把 Json 对象转为 json 字符串,不过传入字符串的时候需要设置类型。

IndexRequest indexRequest = new IndexRequest

以上是关于elasticsearchThe number of object passed must be even but was [1]的主要内容,如果未能解决你的问题,请参考以下文章

LeetCode 287. Find the Duplicate Number (python 判断环,时间复杂度O(n))

9. Palindrome Number数学

[LeetCode] 268. Missing Number

Ugly number丑数2

LeetCode #509. Fibonacci Number

[LeetCode] 191. Number of 1 Bits