Feature: Fuzzy search with lunr.js #1557
Replies: 2 comments
-
I would recommend building a plugin to do this via template customization (template architecture docs) as a first step. The plugin could initially just be included into projects on a per-use basis and we can revisit its inclusion into YARD core if it works really well. |
Beta Was this translation helpful? Give feedback.
-
A while ago I wrote a JS library called fuzzybear focused specifically on short string fuzzy search, which outperforms most contenders in result quality including Lunr.js. It's an interface for string distance algorithms and by default uses Jaccard and Jaro-Winkler distances which together result in exceptional results in single word match performance. This is perfect for looking up class and method names, although Lunr.js might be more useful as it could look into descriptions, arguments, comments and notes. |
Beta Was this translation helpful? Give feedback.
-
I'd like to propose the following improvement:
Making the search support fuzzy matches using an engine like Lunr.js
This way if I misspelled a class or method name it would still show up.
Earlier today I was looking for a wrong class name (I added an extra
s
toLocation
) and was getting API modules instead of theLocation
module. It would have been really useful if it had matched both results.Beta Was this translation helpful? Give feedback.
All reactions