// Store all online users in same location (city) to a Set.In this case, store user:1 to New York set SADD location: New York 1 // Store all users age to Sorted Set.Want to build an app similar to Tinder for the dating niche?You probably have heard a lot about dating apps being saturated and competitive, but.. Now, your crazy dating app idea doesn’t seem to be that crazy, right?
That being said, you should take care of the common . However, the user on gets to see ‘3 miles away’ or ‘5 miles away’ in his app’s UI: But, if you play a little bit with the backend, you would find user distances in the form of ‘3.01156’ or ‘5.223254’.
In this case, user:1 has age 30 ZADD age 30 "1" // Retrieve users in New York age from 20 to 40 ZINTERSTORE tmpkey 2 location: New York age AGGREGATE MAX ZRANGEBYSCORE tmpkey 20 40 Most no SQL Geo/proximity index features rely on the Geo Hash Algorithm It's a good thing to understand how it works, and it's really quite fascinating.
This technique can also be used to create highly efficient indexes on a relational database.
The Geo API consists of a set of new commands that add support for storing and querying pairs of longitude/latitude coordinates into Redis keys.
Geo Set is the name of the data structure holding a set of (x,y) coordinates.