Skip to content

Inconsistant search result #22

Description

@pognibene

Hi,

I have a small set of strings to search:

first_name_6 last_name_6
first_name_2 last_name_2
first_name_1 last_name_1
first_name_5 last_name_5
first_name_4 last_name_4
first_name_3 last_name_3

(it's a single string field).

Searching with different parameters yields inconsistent results:

6 =>
first_name_6 last_name_6

_6 =>
first_name_6 last_name_6

name_6 =>
first_name_6 last_name_6
first_name_2 last_name_2
first_name_1 last_name_1
first_name_5 last_name_5
first_name_4 last_name_4
first_name_3 last_name_3

This last search should result in only the first line... Any hint? Seems to be linked to the presence of an '_' in the strings.

BTW my configuration:

_fuse = Fuzzy<model.TribeMember>(
      _members,
      options: FuzzyOptions(
        findAllMatches: true,
        keys: [
          WeightedKey(name: "fullName", getter: (i) => i.fullName, weight: 1.0)
        ],
        threshold: 0.4,
        isCaseSensitive: false,
      ),
    );

Activity

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

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