Skip to content

Query results for user's name #245

Open
@iammatis

Description

@iammatis

According to issues #166, #142, #226 sonic searches based on start-of-word, therefore strings like "Search" are not found with "earc" (and Crisp example is accompanied by SQL LIKE search #141)

We are trying out sonic on a user search, where we pushed strings in form of: '<first_name><space><last_name>' [*], is this string considered a "single string" or "multiple strings" (because of the space) and sonic tries to match either of them (either first name or last name) ?

[*]: We actually push our usernames likes this '<FN><space><LN><space><FN.normalized><space><LN.normalized>', as our user's name can contain diacritics and sonic is not happy with that (Normalization mentioned in issue #208 and diacritics in #242)

If we take for example a name "Veronika Šibanová" (pushed as 'Veronika Šibanová Veronika Sibanova') and search for:
Ve or Ver -> ❌ (matches other names, which I guess are result of Levenshtein distance (?), mentioned in bunch of other issues)
Vero all the way to Veronika -> ✅ (matches correct names)
It still works even with the last name added:
Veronika S all the way to Veronika Sibanova -> ✅ (matches correct names)

However when we try to search by last name first:
S and Si -> ❌ matches nothings (too short of a word I pressume)
Sib all the way to Sibanova -> ✅ matches correct names
It even matches:
Sibanova V -> ✅ correct name
But when we try matching
Sibanova Ve, Sibanova Ve, Sibanova Ver -> ❌ does not match anything
Then with four letters:
Sibanova Vero -> ✅ it agains starts matching

Why did the Sibanova V return results but Sibanova Ve didn't ? Also is there any other way to search without diacritics or do we have to keep pushing it with the normalized name ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions