Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
leeoniya
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
50 ms
·
421.
▲
by
leeoniya
4y ago
there are many ways to be fuzzy, so it's quite subjective. uFuzzy can be made tolerant to extra insertions in the matches between/around the specified needle chars, and can also handle out of order terms. those together cover a su
422.
▲
by
leeoniya
4y ago
no, and definitely outside the scope of a micro-lib!
423.
▲
by
leeoniya
4y ago
ok, thanks for the advice. i'll see if the MiniSearch settings can be improved for this demo without drastically affecting the quality of the "search" case.
424.
▲
by
leeoniya
4y ago
> A blunt answer to your question is: I didn't take the time to read everything. s/everything/anything this is by no means meant to replace fulltext search, with term omission tolerance, typos, stemming, etc. fwiw, i wrote
425.
▲
by
leeoniya
4y ago
this is answered in other parts of the thread here [1], but there might be some hope for it still! https://github.com/leeoniya/uFuzzy/issues/2 however, it's probably infeasible to accomodate more than si
426.
▲
by
leeoniya
4y ago
ask the V8/Spidermonkey/JavaScriptCore devs how they have such fast regexp interfaces :) other than that, nothing special. the stats-gathering pass works with large columnar arrays rather than thousands of objects. and it only doe
427.
▲
by
leeoniya
4y ago
to compare it with Fuse, click the provided compare link in this post :) > at least creating a ES module version that exists
428.
▲
by
leeoniya
4y ago
levenstein by itself isnt really anything so this question is unanswerable. string distance is only a part of a search algo. generally i expect that it will be significantly slower, but more tolerant to typos. the rest heavily depends on ma
429.
▲
by
leeoniya
4y ago
congratulations on reading nothing else. best time saving technique! in case you're still confused: https://web.archive.org/web/20070310183121/http://www.lejeun...
430.
▲
by
leeoniya
4y ago
> It won't actually find the most obvious results, because the order of the keywords in the search string must match the order of the keywords in the indexed text. i'm really confused why people dont bother actually reading any
431.
▲
by
leeoniya
4y ago
you're not gonna like the perf of doing this for all variations. it will be far faster to put together a regex with all variations and do a single pass. of course if you have specific known/common mistakes, it could be useful to o
432.
▲
by
leeoniya
4y ago
ah yes you should expand the allowable arbitray chars within terms to include a space intraChars: [a-z\d ] (probably not ideal for perf) you can leave intraMax at 1 in this case you dont need either of these if you have camelcase LlanowarEl
433.
▲
by
leeoniya
4y ago
it's very hard to compare. definitely eval each lib's results before accepting any bench numbers as valid! and also please submit any improvements to the codebase to get the results better/closer. i'm only an expert in o
434.
▲
by
leeoniya
4y ago
sorry that Fuse is slow, but that's the point of the demo, isn't it?
435.
▲
by
leeoniya
4y ago
maybe, something limited in scope like this could work...would be interesting to explore.
436.
▲
by
leeoniya
4y ago
if you need solid typo tolerance uFuzzy won't work well since it's based on regexps.
437.
▲
by
leeoniya
4y ago
not sure this would be less overhead than having all strings in memory. you gotta get them into memory anyhow, right? i mean, you can store it in localstorage or wherever to save net transfer for repeated use, but i dont think it would be f
438.
▲
by
leeoniya
4y ago
set intraMax to something big, or Infinity (delete the 0). this will allow arbitrary amount of junk between each char
439.
▲
by
leeoniya
4y ago
i'm curious how a regexp can handle arbitrary substitutions. afaik you need to be explicit about what alterations can occur for each character, but if that list is arbitray, then the regexp will simply match everything. e.g. /^cat
440.
▲
by
leeoniya
4y ago
> ignore the haters i'm an OSS dev; how thin do you think my skin is? :D
441.
▲
by
leeoniya
4y ago
you could probably say the same about declarative ui frameworks, but given how many opinions there are for what the "right" way is in both cases, i doubt this will ever happen.
442.
▲
by
leeoniya
4y ago
quality: https://leeoniya.github.io/uFuzzy/demos/compare.html?libs=uF... perf: https://github.com/leeoniya/uFuzzy#benchmark
443.
▲
by
leeoniya
4y ago
when Larry Ellison decided to generously author a free script version of Java...
444.
▲
by
leeoniya
4y ago
yeah, i took the corpus from fuzzysort and extended it some :) > Mine was definitely tuned for filenames and matching CamelCaseWords. mhm, mine considers case-change and alpha-num boundaries same as whitespace and punct boundaries (boost
445.
▲
by
leeoniya
4y ago
yep. the core is regexp based and there is no string distance assertion during initial pre-filtering, so this wont be a use case uFuzzy can accomodate. the intro does caveat that it would make for a poor spellcheck :) FlexSearch actually do
446.
▲
by
leeoniya
4y ago
not familiar with it, but depends on what you need. filtering one one column? easy. filtering multiple columns via AND? also easy. filtering multiple columns plus highlighting matched parts in each? will take more work, but shouldnt be daun
447.
▲
by
leeoniya
4y ago
heh, think i have yours in my comparison demos (on phone currently, cannot verify) you can make uFuzzy behave similarly by setting intraMax to Infinity (just remove 0 from the field). but the results are usually too fuzzy in this config, th
448.
▲
Show HN: uFuzzy.js – A tiny, efficient fuzzy search that doesn't suck
(github.com)
251 points
by
leeoniya
4y ago
|
82 comments
449.
▲
by
leeoniya
4y ago
i had the same experience after they revamped the Windows Calculator. it went from instantaneous to ~2s startup with UI jank. (highly recommend Notepad3) i don't miss the ceremony of trying to debloat Windows after every unstoppable au
450.
▲
by
leeoniya
4y ago
also thought it was odd that AVIF was not compared - it would show a major quality and size improvement over WebP.
More ›