原因:1)字段A为nested字段,给的值为字符串形式
解决办法:1)新建一个JSONObject封装字符串
2)
IndexRequest indexRequest = new IndexRequest(indexName, dataType , docID) .source(jsonObject.toString(),XContentType.JSON);
原因:1)字段A为nested字段,给的值为字符串形式
解决办法:1)新建一个JSONObject封装字符串
2)
IndexRequest indexRequest = new IndexRequest(indexName, dataType , docID) .source(jsonObject.toString(),XContentType.JSON);