Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Results not quite matching #369

Closed
patrioticcow opened this issue Mar 26, 2020 · 3 comments
Closed

Results not quite matching #369

patrioticcow opened this issue Mar 26, 2020 · 3 comments
Assignees

Comments

@patrioticcow
Copy link

Here's a weird case:

Search Data:

[{"search":"2021 Ford Transit Connect"},{"search":"2020 Ford EcoSport"},{"search":"2020 Ford Edge"},{"search":"2020 Ford Escape"},{"search":"2020 Ford Expedition"},{"search":"2020 Ford Explorer"},{"search":"2020 Ford F-150"},{"search":"2020 Ford Fusion"},{"search":"2020 Ford Fusion Energi"},{"search":"2020 Ford Fusion Hybrid"},{"search":"2020 Ford Mustang"},{"search":"2020 Ford Ranger"},{"search":"2020 Ford Super Duty F-250"},{"search":"2020 Ford Super Duty F-350"},{"search":"2020 Ford Transit Connect"},{"search":"2020 Ford Transit Passenger Wagon"},{"search":"2020 Ford Transit Van"},{"search":"2019 Ford EcoSport"},{"search":"2019 Ford Edge"},{"search":"2019 Ford Escape"},{"search":"2019 Ford Expedition"},{"search":"2019 Ford Explorer"},{"search":"2019 Ford F-150"},{"search":"2019 Ford Fiesta"},{"search":"2019 Ford Flex"},{"search":"2019 Ford Fusion"},{"search":"2019 Ford Fusion Energi"},{"search":"2019 Ford Fusion Hybrid"},{"search":"2019 Ford Mustang"},{"search":"2019 Ford Ranger"},{"search":"2019 Ford Super Duty F-250"},{"search":"2019 Ford Super Duty F-350"},{"search":"2019 Ford Taurus"},{"search":"2019 Ford Transit Connect"},{"search":"2019 Ford Transit Passenger Wagon"},{"search":"2019 Ford Transit Van"},{"search":"2018 Ford C-Max"},{"search":"2018 Ford EcoSport"},{"search":"2018 Ford Edge"},{"search":"2018 Ford Escape"},{"search":"2018 Ford Expedition"},{"search":"2018 Ford Explorer"},{"search":"2018 Ford F-150"},{"search":"2018 Ford Fiesta"},{"search":"2018 Ford Flex"},{"search":"2018 Ford Focus"},{"search":"2018 Ford Fusion"},{"search":"2018 Ford Fusion Energi"},{"search":"2018 Ford Fusion Hybrid"},{"search":"2018 Ford Mustang"},{"search":"2018 Ford Super Duty F-250"},{"search":"2018 Ford Super Duty F-350"},{"search":"2018 Ford Taurus"},{"search":"2018 Ford Transit Connect"},{"search":"2018 Ford Transit Van"}]

and the search options

let options = {
  threshold: 0.6,
  location: 0,
  distance: 70,
  minMatchCharLength: 1,
  keys: [
    "search"
  ]
};
let fuse = new Fuse(list, options);
let result = fuse.search("F-250");

The search term is F-250

I expect to get Ford Super Duty F-250 at the top, but I don't

Any ideas?

@danielfdickinson
Copy link

danielfdickinson commented Mar 26, 2020 via email

@patrioticcow
Copy link
Author

@cshoredaniel interesting.. I tested with the term being closer to the beginning
I get better results, but still, F-150 shows up first, then F-250, and so on mixed together.

I would thing there should be a way to get more precise match.

[{"search":"Transit Connect 2021 Ford Transit Connect"},{"search":"EcoSport 2020 Ford EcoSport"},{"search":"Edge 2020 Ford Edge"},{"search":"Escape 2020 Ford Escape"},{"search":"Expedition 2020 Ford Expedition"},{"search":"Explorer 2020 Ford Explorer"},{"search":"F-150 2020 Ford F-150"},{"search":"Fusion 2020 Ford Fusion"},{"search":"Fusion Energi 2020 Ford Fusion Energi"},{"search":"Fusion Hybrid 2020 Ford Fusion Hybrid"},{"search":"Mustang 2020 Ford Mustang"},{"search":"Ranger 2020 Ford Ranger"},{"search":"Super Duty F-250 2020 Ford Super Duty F-250"},{"search":"Super Duty F-350 2020 Ford Super Duty F-350"},{"search":"Transit Connect 2020 Ford Transit Connect"},{"search":"Transit Passenger Wagon 2020 Ford Transit Passenger Wagon"},{"search":"Transit Van 2020 Ford Transit Van"},{"search":"EcoSport 2019 Ford EcoSport"},{"search":"Edge 2019 Ford Edge"},{"search":"Escape 2019 Ford Escape"},{"search":"Expedition 2019 Ford Expedition"},{"search":"Explorer 2019 Ford Explorer"},{"search":"F-150 2019 Ford F-150"},{"search":"Fiesta 2019 Ford Fiesta"},{"search":"Flex 2019 Ford Flex"},{"search":"Fusion 2019 Ford Fusion"},{"search":"Fusion Energi 2019 Ford Fusion Energi"},{"search":"Fusion Hybrid 2019 Ford Fusion Hybrid"},{"search":"Mustang 2019 Ford Mustang"},{"search":"Ranger 2019 Ford Ranger"},{"search":"Super Duty F-250 2019 Ford Super Duty F-250"},{"search":"Super Duty F-350 2019 Ford Super Duty F-350"},{"search":"Taurus 2019 Ford Taurus"},{"search":"Transit Connect 2019 Ford Transit Connect"},{"search":"Transit Passenger Wagon 2019 Ford Transit Passenger Wagon"},{"search":"Transit Van 2019 Ford Transit Van"},{"search":"C-Max 2018 Ford C-Max"},{"search":"EcoSport 2018 Ford EcoSport"},{"search":"Edge 2018 Ford Edge"},{"search":"Escape 2018 Ford Escape"},{"search":"Expedition 2018 Ford Expedition"},{"search":"Explorer 2018 Ford Explorer"},{"search":"F-150 2018 Ford F-150"},{"search":"Fiesta 2018 Ford Fiesta"},{"search":"Flex 2018 Ford Flex"},{"search":"Focus 2018 Ford Focus"},{"search":"Fusion 2018 Ford Fusion"},{"search":"Fusion Energi 2018 Ford Fusion Energi"},{"search":"Fusion Hybrid 2018 Ford Fusion Hybrid"},{"search":"Mustang 2018 Ford Mustang"},{"search":"Super Duty F-250 2018 Ford Super Duty F-250"},{"search":"Super Duty F-350 2018 Ford Super Duty F-350"},{"search":"Taurus 2018 Ford Taurus"},{"search":"Transit Connect 2018 Ford Transit Connect"},{"search":"Transit Van 2018 Ford Transit Van"}]

@krisk krisk self-assigned this Mar 26, 2020
@krisk krisk added the question label Mar 26, 2020
@github-actions
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants