krisk / Fuse

Lightweight fuzzy-search, in JavaScript

Home Page:https://fusejs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question, or bug on live demo page

TDola opened this issue · comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Your question

On the demo page https://www.fusejs.io/demo.html

If you search for symbols

The results make no sense.

[
  {
    "item": {
      "title": "The Lost Symbol",
      "author": {
        "firstName": "Dan",
        "lastName": "Brown"
      }
    },
    "refIndex": 10
  },
  {
    "item": {
      "title": "Monster 1959",
      "author": {
        "firstName": "David",
        "lastName": "Maine"
      }
    },
    "refIndex": 22
  }
]

There is nothing matching for David or Monster. At best monster has 3 matching letters in a totally different order.

Can someone explain why Monster 1959 is a result for symbols but not for symbol?

As a newb: perhaps because symbols is a closer match: "__m_o_s" is somewhat close to "mons" in monster. Whereas symbol does not have that final "s" in position. You can lower "threshold" to 0.4 to limit more results to higher matches.

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days