Hacker News new | ask | show | jobs
by evandrofisico 2245 days 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.

1 comments

What's the file size of the index? Is it just encoded in JSON?
Yes, it's encoded json for lunr.js. Here's the index for my static-site blog: https://blog.kevinastone.com/search_index.json. It's 305kb un-compressed at the moment (38kb gzipped).