Right now the trie and the Levenshtein automaton that handle prefix searches, operate on chars. This means that while we can store and search for prefixes using utf-8 non-latin strings (or any encoding for that matter), fuzzy matching will not work, because levenshtein distance is calculated in bytes and not codepoints / letters.
We need to operate on unicode runes, and not on chars. However, doing this with variable length encoding like utf-8 is difficult in the current implementation of the trie, and will probably reduce performance considerably.
The above will make the module consume more memory. However, the penalty will not be too bad:
Any mix of 1 and 2 will yield a result in between.
cc: @mannol
Looking forward to this!
good news: converting the trie to work with 16 bit runes and not chars was trivial. basically all that's left is to do the same to the fuzzy matcher, and translate utf8 to runes.
Oh man... That's awesome!
Done! please checkout the unicode_trie branch and give it a try. If all is good - I'll merge to master.
Nothing changes externally.
PS Notice that due to a breaking change the modules API, you need to run the new version on a fresh 4.0 or unstable version of redis.
NICE! I'll test it tomorrow and report the results. Thanks for your hard
work!
On 05.12.2016 15:02, Dvir Volk wrote:
>
PS Notice that due to a breaking change the modules API, you need to
run the new version on a fresh 4.0 or unstable version of redis.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RedisLabsModules/RediSearch/issues/9#issuecomment-264861163,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMfmCl8iElNzWT4kxG4FCv8dEI_JhBiVks5rFBlegaJpZM4LCBTC.
Fix confirmed! Thank you very much man!
EDIT:
Just so you know, if it may concern you, I tested against the same input as in the issue #7
great. I tested it with some Hebrew text and it worked fine, and I've added this to the unit tests.
I'm merging to master.
BTW may I ask what company/project you are going to use it in?
fixed in #10
Well, it's a social network, that's all I'm going to say. ;)
something new or an existing company?
A relatively new start-up but, based on an existing company not previously related to the field.
well, when it's out there in production do share if you can.
Will do. Thanks again!
Most helpful comment
well, when it's out there in production do share if you can.