3 ms·
You can also do the lunr index creation server side, with lib in php or python, generating a quite smaller file and also reducing processing time on the client
by evandrofisico 6y ago
You can also do the lunr index creation server side, with lib in php or python, generating a quite smaller file and also reducing processing time on the client side.
I've been developing a podcast hosting solution that parses the xml feed, generate static pages and prebuilds a lunr index, and for ~100 posts, it takes around 30 seconds to build server side and less than a second to download and and load on the client.
- tootie 6y agoWhat's the file size of the index? Is it just encoded in JSON?
- kevinastone 6y agoYes, it's encoded json for lunr.js. Here's the index for my static-site blog: https://blog.kevinastone.com/search_index.json https://blog.kevinastone.com/search_index.json. It's 305kb un-compressed at the moment (38kb gzipped).