summaryrefslogtreecommitdiff
path: root/lib/search/index.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-08 02:18:49 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-08 02:18:49 +0100
commitbbbd8bbab8737f5067c85376daf79cd8a5a9c4cb (patch)
tree844d1385d7b88623eee3c2ea2c420280006ad349 /lib/search/index.js
parente4e0cf21a31b74d5ee1e6d45b343ea60ed44f372 (diff)
parentdf674eef8e20c43426c0af5aa3d1a09b5e24c58a (diff)
merge
Diffstat (limited to 'lib/search/index.js')
-rw-r--r--lib/search/index.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/search/index.js b/lib/search/index.js
index 8d209e6..27f436f 100644
--- a/lib/search/index.js
+++ b/lib/search/index.js
@@ -35,8 +35,16 @@ var STOPWORDS = new Set(
);
function find_term(term) {
- bdb.get(term)
-
+ var matches = bdb.get(term).split(",").map((s) => {
+ var partz = s.split(" ")
+ var match = {
+ thread: s[0],
+ comment: s[1],
+ file: s[2],
+ strength: s[3],
+ }
+ })
+ return matches
}
function search (query, start, limit) {