redisearch
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -32,14 +32,6 @@ 'use strict'; | ||
} | ||
if (!Object.keys(data).length) { | ||
throw new Error('no data to index'); | ||
} | ||
await indexData(namespace, data, id); | ||
await redisClient.zadd(namespace + ':indexed:ids' , id); | ||
}; | ||
Search.prototype.getIndexedCount = async function () { | ||
return await redisClient.zcard(this.namespace + ':indexed:ids'); | ||
}; | ||
Search.prototype.query = async function (data, start, stop) { | ||
@@ -143,3 +135,2 @@ var namespace = this.namespace; | ||
await redisClient.del(namespace + ':id:' + id + ':indices'); | ||
await redisClient.zrem(namespace + ':indexed:ids' , id); | ||
return this; | ||
@@ -146,0 +137,0 @@ }; |
@@ -5,3 +5,3 @@ { | ||
"description": "A plugin to search data with redis", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
17828
306