Closed CodeSpent closed 1 year ago
You can see some of my previous work with indexing on integrating with flexsearch
in this commit:
I believe this bundle size was only ~1MB, but that's still really high.
Honestly, since we're using NextJS, it's highly suggested to migrate to using server-side searching instead of client-side search
Indexing concern addressed with transition to contentlayer-dev.
An index for the array above would return 0 results for the query
c
but 1 result forch
. Even thoughch
must contain the initial queryc
, the structure of Lunr's index will not suffice to produce better results.I've spoken with CrutchCorn whose work is the current blog implementation's basis, who said the justification for sticking with Lunr's indexing is due to other indexing options bloating their bundle to 1-4+ MB.
I'd like to investigate more into how indexing can be improved for the current implementation.