Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

RANGES argument for ZINTERSTORE #452

wants to merge 4 commits into


None yet
4 participants

Coded simple enhancement to ZINTERSTORE. Main idea behind this is to intersect large zsets faster and using less memory by avoiding intermediate operations. It also makes some new query based data models possible (without scripting). Here is what it looks like:

ZINTERSTORE out 2 zset1 zset2 RANGES 1 10 5 25

It will do interstore on subsets of zset1 with scores between 1 to 10 and zset2 with scores between 5 and 25. Score ranges are specified the same way as in other commands using numbers, infinities and exclusion.

The worst case time complexity does not change.

+1. I was just looking for that functionality.

jamesjin commented May 7, 2013

This is really useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment