hawksworx.com
hawksworx.com copied to clipboard
Search enhancements
A coupe of improvement suggestions:
- you don't need to add the
title
into thetext
- keep them separate, and weight the title hits higher than text hits. - split the words on " " (space), and check each one individually. That way, the search words can be separated/out of order from the article text.
- use a lib that allows for some typos, eg:
- https://github.com/sindresorhus/leven
- https://github.com/aceakash/string-similarity
Nice job, thanks for the 11ty article!
These are all good suggestions. Thanks @crazy4groovy. Currently my implementation is terrible simplistic. Just good enough!
I'll plan to fold in some of these suggestions soon.