Fuzzy search

Languages and libraries

javascript library

SHOW HN2015

25points
14comments
#1,043of 2,565 in 2015
Top 41%of 2015 by points

How HN took it

RoastedHalf or more of the comments are critical

0 positive, 4 neutral or asking, 1 mixed, 5 critical, out of 10 comments about the project. Thread score -0.29.

Idea: 0 for, 4 againstExecution: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Simple and clean implementation

    From 1 comment
    • So it's a "string contains string" function in Javascript? I mean, that's great, and this seems like a simple and clean implementation, but is it really worthy of a hacker news…
      acbart on HN
  • Regex explanation of matching algorithm is concise

    From 1 comment
    • Yes good catch. It's going to be a lot slower anyway. Still does a good job at explaining the matching algorithm concisely.
      Guillaume86 on HN

Objections

  • Is just an in-order character subsequence match, not really fuzzy search

    From 2 comments
    • So it's a "string contains string" function in Javascript? I mean, that's great, and this seems like a simple and clean implementation, but is it really worthy of a hacker news…
      acbart on HN
    • > In this use case, it's not necessary to figure out how similar strings are, because it's completely irrelevant. I don't follow, since that's pretty much the definition of…
      kelseyfrancis on HN
  • Regex approach breaks on special characters and is slower

    From 3 comments
    • It's only the same as long as your search string doesn't contain any special characters as far as regex is concerned.
      mistercow on HN
    • Yes good catch. It's going to be a lot slower anyway. Still does a good job at explaining the matching algorithm concisely.
      Guillaume86 on HN
    • Except egrigiously slower https://github.com/bevacqua/fuzzysearch/pull/6#issuecomment-77263900
      bevacqua on HN
  • Does not handle typos or substitutions

    From 2 comments
    • I guess fuzzy search also allows for substitutions like "csrtwheel", but neither you nor the OP does this.
      solox3 on HN
    • > In this use case, it's not necessary to figure out how similar strings are, because it's completely irrelevant. I don't follow, since that's pretty much the definition of…
      kelseyfrancis on HN

Requests

  • Support typo tolerance via edit distance

    From 1 comment
    • > In this use case, it's not necessary to figure out how similar strings are, because it's completely irrelevant. I don't follow, since that's pretty much the definition of…
      kelseyfrancis on HN

Questions

  • Why not just use string contains or a regex

    From 2 comments
    • So it's a "string contains string" function in Javascript? I mean, that's great, and this seems like a simple and clean implementation, but is it really worthy of a hacker news…
      acbart on HN
    • I think ``` new RegExp("twl".split("").join("(.+)?")).test("cartwheel") ``` does approximately the same, no?
      bshimmin on HN

Alternatives named

  • Damerau-Levenshtein distance implementations

    From 1 comment
    • Yeah, anyone thinking of using this should probably instead just look for an existing implementation of something like the Damerau–Levenshtein distance.
      kelseyfrancis on HN
  • Levenshtein with a BK-Tree

    From 1 comment
    • > In this use case, it's not necessary to figure out how similar strings are, because it's completely irrelevant. I don't follow, since that's pretty much the definition of…
      kelseyfrancis on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/9143665)