nl_tokens: Query the index using lunr . We store the documents and index in memory for speed and also because lunr . js is designed to be memory resident
pl_tokens: function queryDocs ( <mask> ) { return docsIndex . search ( query ) . map ( result => { const doc = documents [ result . ref ] , snippet = makeSnippet ( doc , query ) ; return { path : doc . path , title : doc . title , snippet : snippet , } ; } ) ; }