Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const idx = lunr(function () {
this.use(lunr.es)
this.field('title')
this.field('text')
this.ref('id')
for (doc of data.docs) {
this.add(doc)
documents[doc.id] = doc
}
})