How to use the lunr.es function in lunr

To help you get started, we’ve selected a few lunr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yeraydiazdiaz / lunr.py / tests / acceptance_tests / javascript / language_query.js View on Github external
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
  }
})