spring-data-redis icon indicating copy to clipboard operation
spring-data-redis copied to clipboard

Create zset index for sorting and range query [DATAREDIS-814]

Open spring-projects-issues opened this issue 7 years ago • 7 comments

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

spring-projects-issues avatar Apr 24 '18 00:04 spring-projects-issues

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

spring-projects-issues avatar Apr 24 '18 07:04 spring-projects-issues

Yan Ma commented

Range query returns all the matching records.

Pls grant me privilege to new a branch. Thanks

spring-projects-issues avatar Apr 27 '18 23:04 spring-projects-issues

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

spring-projects-issues avatar Apr 28 '18 10:04 spring-projects-issues

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.

 

spring-projects-issues avatar Aug 30 '19 05:08 spring-projects-issues

Mark Paluch commented

Let's revisit this topic for Spring Data Redis 3.0

spring-projects-issues avatar Oct 05 '20 14:10 spring-projects-issues

Mark Paluch commented

Let's revisit this topic for Spring Data Redis 3.0

Many thanks @mp911de. any question/comment, pls let me know!

awso avatar Jan 03 '21 15:01 awso