redisearch
Advanced tools
Comparing version 1.0.0 to 1.0.1
module.exports = require('./lib/redis-search'); |
@@ -185,3 +185,3 @@ 'use strict'; | ||
function toWords(content) { | ||
return String(content).match(/\w+/g); | ||
return String(content).match(/[\p{L}_]+/ug); | ||
} | ||
@@ -188,0 +188,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "A plugin to search data with redis", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -36,3 +36,3 @@ # redis-search | ||
``` | ||
postSearch.query({content: "orange", uid: 5, cid: 2}, function(err, ids) { | ||
postSearch.query({ query: { content: "orange", uid: 5, cid: 2} }, function(err, ids) { | ||
console.log(ids); // ["2"] | ||
@@ -55,7 +55,7 @@ }); | ||
// search for ids where content contains `orange` and cid is 2 or 4 | ||
postSearch.query({content: "orange", cid: [2,4]}, callback); | ||
postSearch.query({ query: { content: "orange", cid: [2,4] } } , callback); | ||
// search for ids where uid is 5 and return 3 results | ||
postSearch.query({uid: 5}, 0, 2); | ||
postSearch.query({ query: { uid: 5 } }, 0, 2); | ||
``` | ||
@@ -0,0 +0,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
17828