hawksworx.com icon indicating copy to clipboard operation
hawksworx.com copied to clipboard

Search enhancements

Open crazy4groovy opened this issue 5 years ago • 1 comments

A coupe of improvement suggestions:

  • you don't need to add the title into the text - 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!

crazy4groovy avatar Nov 08 '19 13:11 crazy4groovy

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.

philhawksworth avatar Jan 07 '20 12:01 philhawksworth