Skip to content

Search matching improvement, split search string by space #302

@alexgrozav

Description

@alexgrozav

Hey! First of all, amazing work on Fuse.js. I've moved my search functions from Algolia to a completely front end solution using Fuse.

Comparing Fuse and Algolia, I've encountered a few differences which I believe could be easily improved.

Let's take the following data set:

[
  { title: 'Alert', subtitle: 'Variants' },
  { title: 'Button', subtitle: 'Sizes' }
];

Searching using the following search string: Alert Variants or Button Sizes will yield an empty results array.

Algolia would split the search string and identify the two keywords in the two different search keys, title and subtitle.

I know the current behaviour might be intended, but it would be nice to add an option to split the search string by the space separator and use both words individually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions