Сценарий: я пытаюсь индексировать данные JSON в эластичный.Я получаю сообщение об ошибке типа
17: 13: 38.146 [main] ОШИБКА com.opnlabs.lighthouse.elastic.ElasticSearchIndexer - {"root_cause": [{"type": "invalid_argument_exception", "reason ":" Невозможно объединить сопоставление не-объекта [map.audits.map.font-size.map.details.map.items.myArrayList.map.selector] с сопоставлением объекта [map.audits.map.font-size.map.details.map.items.myArrayList.map.selector] "}]," type ":" invalid_argument_exception "," reason ":" Невозможно объединить не объектное отображение [map.audits.map.font-size.map.details.map.items.myArrayList.map.selector] с отображением объекта [map.audits.map.font-size.map.details.map.items.myArrayList.map.selector] "}
В чем причина проблемы?Пожалуйста, помогите
Код
JSONObject newJsonObject = new JSONObject();
JSONObject log = jsonObject.getJSONObject("audits");
JSONObject log1 = jsonObject.getJSONObject("categories");
newJsonObject.put("audits", log);
newJsonObject.put("categories", log1);
newJsonObject.put("timeStamp", time);
Index index = new Index.Builder(newJsonObject).index(mongoIndexName+"1").type("data").build();
DocumentResult a = client.execute(index);
В основном я пытаюсь добавить 3 значения json в индекс упругости.Пожалуйста, помогите мне с тем, что я делаю неправильно.