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

Fix string tolerance option (#480) #516

Merged
merged 2 commits into from
Oct 11, 2023
Merged

Fix string tolerance option (#480) #516

merged 2 commits into from
Oct 11, 2023

Conversation

SP321
Copy link
Contributor

@SP321 SP321 commented Oct 10, 2023

/claim #480

Added a testcase for the (issue #480).
Confirmed bug by testcase fail.
Added Levenshtein distance calculation on radix tree.
distance on tree is only calculated if exact option is not used and tolerance>0. (existing logic is used if tolerance is 0 or exact is true)
Confirmed all testcases(including added testcase of #480) passed.

@vercel
Copy link

vercel bot commented Oct 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orama-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2023 8:39am

Copy link
Member

@micheleriva micheleriva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@micheleriva micheleriva merged commit 8f70521 into askorama:main Oct 11, 2023
2 checks passed
@@ -87,7 +87,7 @@ function validateComponents<OramaSchema, TIndex, TDocumentStore, TSorter, TOrama
}

export async function create<
const OramaSchema,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@micheleriva This change will break the inference of schemas

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That line was showing a linting error. I don't know why const would be used in a generic type parameter. reverting this change has no effect on fix and will still work properly.

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

Successfully merging this pull request may close these issues.

None yet

3 participants