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

index key question #87

Open
yosefy opened this issue Jun 11, 2023 · 1 comment
Open

index key question #87

yosefy opened this issue Jun 11, 2023 · 1 comment

Comments

@yosefy
Copy link

yosefy commented Jun 11, 2023

if we have values:

abcd
abce

after trimming the suffix:
cd
ce

now if we got request for key : "abcd"
how do we know in which one is it?

thanks

@vmx
Copy link
Member

vmx commented Jun 12, 2023

I can't speak for the Go implementation, but only for the algorithm in the original Rust implementation, but it should be the same. In case of your values, you wouldn't trim at all, as the only difference between abcd and abce is the d and the e. It's preserved for the reason that you mention, without it, you couldn't distinguish the two.

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

No branches or pull requests

2 participants