Closed
Description
Describe the bug
When doing full text search with threshold 0 on a document that contains a few words with common roots, we don't get a hit until we've typed enough characters to disambiguate them.
To Reproduce
Search with threshold 0 the following test cases:
On the indexed value "Phone, phonogram":
- search for "p", "ph", "pho" or "phon" -> no hits (we should get a hit obviously)
- search for "phone" or "phono" -> 1 hit (as expected)
On the indexed value "Bet, better":
- search for "b", "be" or "bet" -> no hits (we should get a hit, it's even worst than the previous case because "bet" is actually a full word match)
- search for "bett", "bette" or ""better" -> 1 hit (as expected)
- search for "bet hi" -> 1 hit (searching for an additional word now gives us a hit for "bet", puzzling...)
On the indexed value "Some random sentence"
- search for "s" -> no hits (we have 2 words that start with s, should be getting a hit)
- search for "r" -> 1 hit
- search for "se" or "so" -> 1 hit
Expected behavior
see previous reproduction description
Environment Info
OS: macOS 15.3.2
Node: 22.14.0
Orama: 3.1.2
Affected areas
Search
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels