Skip to content

Allow keys weight. #8

@SkyzohKey

Description

@SkyzohKey

Fuse does supports specifying the keys as an array of objects like the following, would be super nice to have. It permits to sort the results depending on the weight the field that matched has. 😋

const KEYS_TO_FILTER = [
  { name: 'item.title', weight: 1.0 },
  { name: 'item.description', weight: 0.8 },
  { name: 'item.author', weight: 0.4 }
];

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions