-
Notifications
You must be signed in to change notification settings - Fork 6
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
Order of insertion of words with identical wordstem changes result set. #6
Comments
Hi Phillip, |
Hi @glaslos, |
Hi @SirGrandmasterr , |
Hi @glaslos, |
Just found your PR again, sorry for the silence. I had a look at the code and it seems this is intentional behavior (although questionable): if you insert
if you switch the order, you get
representing both provided values. Would you be comfortable attempting to make that change? |
Hi,
while using this package to include a little form of an elasticsearch-like prefix-suggester, I've noticed that some words would be omitted in the results in some cases. A specific example:
"suspenseful" and "suspense".
I've created two testcases using only those two words that should, as far as I understand it, yield the same expected result.
For some reason, one of those tests will return the expected two strings that were inserted, but the other will only return the longer one.
Is this intended behavior?
{ name: "Word order small => big", dict: []string{"suspense", "suspenseful"}, trie: New(), search: "susp", expected: []string{ "suspense", "suspenseful", }, }, { name: "Word order big => small", dict: []string{"suspenseful", "suspense"}, trie: New(), search: "susp", expected: []string{ "suspense", "suspenseful", }, },
Best Regards,
Phillip
The text was updated successfully, but these errors were encountered: