-
Notifications
You must be signed in to change notification settings - Fork 9
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
incorrect result in fulltext search #5
Comments
|
Hi, @dewshick It works as expected, since your To avoid loss in update, you can, for example, store all values in an array: corpus.each_with_index { |str, id| trie.change_all(:suffix, str) {|arr| arr ||= []; arr << str } }
trie.search_with_prefix(str).flat_map{|_, ids| ids}.uniq.size #=> 55 |
@luikore Great! Thanks for info! |
@dewshick good point, I will change the example |
ruby 2.0.0, triez 1.0.4
each word in corpus contains
str
string, but only 53 out of 55 results are returned during prefix searchThe text was updated successfully, but these errors were encountered: