Skip to content

Commit

Permalink
Replace deleteByQuery deprecated function (#25)
Browse files Browse the repository at this point in the history
* Replace deprecated function

The function deleteByQuery has been deprecated. https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#indexdeletebyquery
We must now use deleteBy. After running the crawler with the new function, everything seems to be working fine

* Fix call to deleteBy
  • Loading branch information
beaubbe authored and nitriques committed Oct 30, 2017
1 parent 8a96bc9 commit d26c4ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ var removeOldEntries = function () {
if (_.isInteger(config.oldentries) && config.oldentries > 0) {
console.log()
console.log('Removing old entries...');
pages.deleteByQuery('*', {
pages.deleteBy({
numericFilters: ['timestamp<' + (new Date().getTime() - config.oldentries)]
}, function (error, content) {
if (!!error) {
Expand Down

0 comments on commit d26c4ce

Please sign in to comment.