Create zset index for sorting and range query [DATAREDIS-814]
Yan Ma opened DATAREDIS-814 and commented
We are using Redis as the main in-memory DB. Our business requirements heavily demand range queries based on attributes of timestamp type or numeric type.
We need an easy way to define the indexes that enable range queries such as LessThan, Between and GreaterThan, etc.
Also we need the complex queries that are based on simple indexes and the range query indexes.
I updated the relevant code in index resolving, writing, query and deleting to support above requirements. Would like to contribute the code to spring-data-redis so that more people can benefit from this.
Referenced from: pull request https://github.com/spring-projects/spring-data-redis/pull/471
Mark Paluch commented
Thanks for raising this issue. That sounds interesting. How did you solve duplicate values (i.e. multiple objects have the same numeric value in one field)?
Feel free to submit a pull request so we can have a look and continue discussion on code level
Yan Ma commented
Range query returns all the matching records.
Pls grant me privilege to new a branch. Thanks
Mark Paluch commented
If you want to contribute, fork the Spring Data Redis repository, push your commits on a branch in your fork and submit a pull request. You can find here our contribution guide
awso commented
My pull request stucks at Travis CI check:
Any hints/documents about how to fix it please?
https://travis-ci.org/spring-projects/spring-data-redis/builds/572529635
Installing oraclejdk8 $ export JAVA_HOME=~/oraclejdk8 $ export PATH="$JAVA_HOME/bin:$PATH" $ ~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL" Ignoring license option: BCL -- using GPLv2+CE by default install-jdk.sh 2019-07-17 Expected feature release number in range of 9 to 14, but got: 8 The command "~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL"" failed and exited with 3 during . Your build has been stopped.
Mark Paluch commented
Let's revisit this topic for Spring Data Redis 3.0
Many thanks @mp911de. any question/comment, pls let me know!