ALGOLIA的错误提示表示,在浏览浏览器结果时使用了过时的page或offset参数。建议在浏览时使用cursor参数,该参数是浏览器浏览结果时推荐的API参数。
以下是使用cursor参数的代码示例:
const index = client.initIndex('your_index_name');
const params = {
hitsPerPage: 20,
cursor: undefined // 这是默认值
};
function browseAll() {
return index.browseAll({
query: '', // 空的查询参数将返回所有记录
params
});
}