Snapshot of lunr.js from https://github.com/olivernn/lunr.js/ with custom fixes related to R3 functionality