Skip to content

Feature request : Handling accents #138

@eric-burel

Description

@eric-burel

Hello there,

I am using fuse to filter documents using some keys (name, company name etc.)
Here are my options:

const options = {
    shouldSort: true,
    threshold: 0.3,
    tokenize: true,
    location: 0,
    distance: 100,
    maxPatternLength: 64,
    minMatchCharLength: 1,
    keys: [
      "DocumentTypeName",
      "PracticeName",
      "CompanyName",
      "ProjectName",
      "Name",
      "Status",
    ],
  }

The tricky part is that I am French: my documents contains a LOT of accents (diacritics). However, when doing a research, I usually expect to match 'é', 'è' and so on to match a simple 'e', same with 'ç', 'à' etc.

Typically I would use an helper function (a good link here), so this is not a huge deal.

But still, that would be good if Fuse could handle this case, for example by allowing us to define a function that is applied to each key before matching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions