josiahcarlson/rom — pull request #30 by Alanperd (2014-05-30 07:14:07+00:00)
Title: Fix for using prefix option and filtering

Sometimes it does not work as intended when you perform operations with the filter and prefix / suffix option.

The file affected is index.py, and the problem is solved adding “pipe.execute()” at the end of each iteration in the method “prepare”. The problem occurred when the first reorder filters was different to a prefix / suffix. The Lua code always is executed before the pipeline. In this situation when the first operation is different to suffix / prefix Lua Script the logical algorithm changes the behavior.

I have create a unit test, with the change it works fine, but if you comment this line, the results are invalid.

The file with the unit test is “PrefixFilterNestTest.py”.

I have seen the new command redis command “zrangebylex”, I think it is interesting, and it could be usefull .

Best regards,
Alan.