无法向 algolia 添加新对象
not able to add new object to algolia
我已经使用了所有配置并遵循了 Algolia 上的指南 (https://www.algolia.com/doc/api-reference/api-methods/add-objects/#examples),但我不知道为什么它不起作用。
我正在使用 js:
const objects = [{
firstname: 'Jimmie',
lastname: 'Barninger'
},
{
firstname: 'Warren',
lastname: 'Speach'
}];
index.addObjects(objects, (err, content) => {
console.log(content);
});
我没有收到错误,我可以使用搜索但不能添加新对象。我还需要其他东西吗?
我只导入了 lite 而不是完整的 Algolia。
错误:
import algoliasearch from 'algoliasearch/lite';
对:
import algoliasearch from 'algoliasearch';
我已经使用了所有配置并遵循了 Algolia 上的指南 (https://www.algolia.com/doc/api-reference/api-methods/add-objects/#examples),但我不知道为什么它不起作用。
我正在使用 js:
const objects = [{
firstname: 'Jimmie',
lastname: 'Barninger'
},
{
firstname: 'Warren',
lastname: 'Speach'
}];
index.addObjects(objects, (err, content) => {
console.log(content);
});
我没有收到错误,我可以使用搜索但不能添加新对象。我还需要其他东西吗?
我只导入了 lite 而不是完整的 Algolia。
错误:
import algoliasearch from 'algoliasearch/lite';
对:
import algoliasearch from 'algoliasearch';