fuzzy icon indicating copy to clipboard operation
fuzzy copied to clipboard

Exact substring match > fuzzy match

Open ccorcos opened this issue 8 years ago • 3 comments

Similar to https://github.com/mattyork/fuzzy/pull/15, I'm having an issue where "div" is an exact substring match but fuzzy matches are ranked above.

ccorcos avatar Jul 07 '17 00:07 ccorcos

[
  {
    "string": "Add Google Drive",
    "score": 5,
    "index": 9,
    "original": {
      "name": "Add Google Drive",
    }
  },
  {
    "string": "Add Divider",
    "score": 5,
    "index": 13,
    "original": {
      "name": "Add Divider",
    }
  },
  {
    "string": "Add Invision",
    "score": 3,
    "index": 12,
    "original": {
      "name": "Add Invision",
    }
  }
]

ccorcos avatar Jul 07 '17 00:07 ccorcos

oh interesting:

image

ccorcos avatar Jul 07 '17 00:07 ccorcos

yeah, I'm having trouble with this too.

I have an item that has my search term exactly 3-4 times, and another item that's has something close to my search term a few hundred times, and the exact match isn't preferred.

Edit: fuse.js seems to be dramatically better at this time. Search results with fuzzy took about 2 seconds, happens in a few milliseconds with better results using fuse.

xoorath avatar Feb 14 '19 17:02 xoorath