【发布时间】:2017-08-12 01:00:15
【问题描述】:
我在将数据推送到我的索引时遇到问题。我的代码如下:
Client client = new Client("APP_ID", "SEARCH_ID");
Index myIndex = client.initIndex("test");
JSONObject jsonObject = null;
try {
jsonObject = new JSONObject()
.put("name", "Jimmie")
.put("username", "Barninger")
} catch (JSONException e) {
e.printStackTrace();
}
myIndex.addObjectAsync(jsonObject, null);
但是什么也没发生,我的仪表板中也看不到任何数据。我做错了什么?
【问题讨论】:
-
您好,能否请您显示您遇到的错误,以便我们更好地帮助您?
-
您好,没有错误,只是没有推送数据对象
-
为了调试,您能否将第二个参数
null替换为CompletionHandler 并在出现错误时结帐?如果是这样,请将错误复制粘贴到您的问题中 -
抱歉,没明白你的意思
-
在下面查看我的答案