diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-01-24 13:07:23 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-01-24 13:07:23 +0100 |
| commit | 08ac33fbd67e115f50855f310f192a4d38fcaf50 (patch) | |
| tree | 63ec4d13306e0b480fe3a21543fd2b97537808dc /bucky/search/lexicon.js | |
| parent | 3ce1a44ab308f4c483541944aa777ec8aa91af2b (diff) | |
begin keyword dump endpoint, add search rebuild endpoint
Diffstat (limited to 'bucky/search/lexicon.js')
| -rw-r--r-- | bucky/search/lexicon.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bucky/search/lexicon.js b/bucky/search/lexicon.js index 2415e81..dc1d7ab 100644 --- a/bucky/search/lexicon.js +++ b/bucky/search/lexicon.js @@ -12,9 +12,9 @@ var total = 0 module.exports = { build: build_index } -function build_index() { +function build_index(cb) { console.log("building index") - parse_threads() + return parse_threads() .then(parse_comments) .then(parse_files) .then( () => { @@ -23,7 +23,7 @@ function build_index() { console.log( "--- UNIQUE WORDS: ", unique ); lexicon_store(); console.log( "Done!") - process.exit() + return { total, unique } }) } function parse_threads() { |
