* Lookup files that contain a given set of words in redis * @param {string[]} words An array of words to lookup * @returns {Promise } Words and their arrays of matching filenames
(words)
| 94 | * @returns {Promise<string[][]>} Words and their arrays of matching filenames |
| 95 | */ |
| 96 | async lookup(words) { |
| 97 | return Promise.all( |
| 98 | words |
| 99 | .map(word => word.toLowerCase()) |
| 100 | .map(word => this.tokenClient.sMembers(word)) |
| 101 | ); |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Check to see if a Document is already stored in redis. |