Example library. Plain JavaScript attempt on running search-index through a service worker. As a PWA. Offline first. Search-index as backend, service worker as the middleware.
Fork repository from GitHub or install from NPM. Then:
$ npm install
$ sirv --host --dev