top | item 16551047

Searching your Hugo site with Lunr.js

2 points| bartdegoede | 8 years ago |bart.degoe.de | reply

2 comments

order
[+] abhv|8 years ago|reply
How big does an index get? 2x the content? 10x the content?
[+] bartdegoede|8 years ago|reply
It will contain all content for pages that are live (in my case that's only 2 so far: http://bart.degoe.de/js/search/index.json), so your user will download all the content you want to have available for search on your site on page load, and then, depending on your index configuration, load more data in memory.

Lunr has an analysis pipeline that will generate a bunch of tokens for queries to match on, and you can do pretty much anything there.

It won't scale to thousands of pages, but I don't have thousands of them anyway :-)