【发布时间】:2021-06-21 23:09:48
【问题描述】:
我正在尝试为 Algolia 中的联系人编制索引。
这是我的代码:
StreamReader re = File.OpenText("contacts.json");
JsonTextReader reader = new JsonTextReader(re);`
JArray batch = JArray.Load(reader);
// Add objects
Index index = client.InitIndex("contacts");
index.AddObjects(batch);
最后一行出现错误:
Not enough rights to add an object
【问题讨论】:
-
你应该先阅读[How to ask [on StackOverflow]](stackoverflow.com/help/how-to-ask)。
-
关于您的具体错误,您使用的 API 密钥似乎不允许您索引对象。
-
@Jerska 我肯定会提高我的“提问技巧”。显然我使用的密钥只是用于搜索。我使用了管理员密钥,它工作正常。非常感谢。
-
我只是将其发布为答案,以便我们可以关闭问题。
标签: algolia