-
Notifications
You must be signed in to change notification settings - Fork 13
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
ZUNIONTOP/ZUNIONREVTOP do not union correctly #8
Comments
Sure. If the scores of same entries in different zsets are different, I think we can choose the min one for ZUNIONTOP and max one for ZUNIONREVTOP. For example,
|
Exactly. No duplicates are allowed as a result from a union. The final score should be the weighted min (or max if REV). |
I think I need a hash set to remember the results. Can I use dict in redis? Or implement something like std::unordered_set/map in C? |
HashGet and HashSet can certainly work, but they'll probably work slower than a native hashtable implementation. do you need this persistent or ephemeral for the context of the query? In my module I'm using a little hash table library called khash for some ephemeral aggregations. it's not very friendly but it's super fast. |
Great, I need ephemeral. Khash is good (but full of macros), I will figure it out. |
khash is weird, but once you get a hang of it, it's really simple. you can life the code from my module. I'm using it to group the same word in different locations in a document. |
@levyfan trying out the commands yields duplicate and missing entries. Do you want to resolve this?
The text was updated successfully, but these errors were encountered: