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

Duplicate indices in result matches #778

Open
1 of 2 tasks
jonahallibone opened this issue Aug 22, 2024 · 1 comment
Open
1 of 2 tasks

Duplicate indices in result matches #778

jonahallibone opened this issue Aug 22, 2024 · 1 comment
Labels

Comments

@jonahallibone
Copy link
Contributor

jonahallibone commented Aug 22, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

I am getting duplicate indices in my match results for items

The Fuse.js version where this bug is happening.

7.0.0

Is this a regression?

  • This is a regression bug

Which version did this behavior use to work in?

None

Steps To Reproduce

const fuseSearch = new Fuse(formFields, {
    keys: ["displayName"],
    threshold: 0.25,
    shouldSort: false,
    includeMatches: true,
  });
  • Search an array of objects where the key displayName is "Proposed Postdoctoral Advisor University/Institution"
  • Notice the indices are duplicated
Screenshot 2024-08-22 at 2 17 33 PM

Expected behavior

The indices should not be repeated

Screenshots

No response

Additional context

No response

@jonahallibone jonahallibone changed the title Duplicate indices Duplicate indices in result matches Aug 22, 2024
@sourabhkhandelwal099
Copy link

hey @krisk,
I am experiencing a similar issue. In my case, the search results include duplicates. Additionally, there are unmatched characters within the range of indices of the matched results, which makes highlighting these unmatched characters challenging.

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

No branches or pull requests

2 participants