The following partial functions intend to manage the response from the GEORADIUS and GEORADIUSBYMEMBER commands.
The following partial functions intend to manage the response from the GEORADIUS and GEORADIUSBYMEMBER commands. The code is not as generic as the previous ones as the exposed types are quite complex and really specific to these two commands
Entry point for GEORADIUS result analysis.
Entry point for GEORADIUS result analysis. The analysis is done in three steps.
First step : we are expecting a MULTI structure and will iterate trivially on it.
Add the given members in the key geo sorted set
Add the given members in the key geo sorted set
The geo sorted set
The members to be added. Format is (longitude, latitude, member)
The number of elements added to the index. Repeated elements are not added.
Get the geohash for each member in the key geo index.
Get the geohash for each member in the key geo index.
The geohash of each queried member.
Retrieve the position of the members in the key geo sorted set.
Retrieve the position of the members in the key geo sorted set. Note that if a member is not part of the set, None will be returned for this element.
the coordinates of the input members in the same order.
Search for members around an origin point in the key geo sorted set
Search for members around an origin point in the key geo sorted set
The geo index we are searching in
The base longitude for distance computation
The base latitude for distance computation
The radius of the circle we want to search in
The unit of the radius. Can be m (meters), km (kilometers), mi (miles), ft (feet)
If true, the coordinate of the found members will be returned in the result
If true, the distance between the origin and the found members will be returned in the result
If true, the hash of the found members will be returned in the result
Max number of expected results
The sorting strategy. If empty, order is not guaranteed. Can be ASC (ascending) or DESC (descending)
The Redis store we want to write the result in
The redis storedist we want to write the result in
The found members as GeoRadiusMember instances
Search for members around a specific memberin the key geo sorted set
Search for members around a specific memberin the key geo sorted set
The geo index we are searching in
The member we are searching around
The radius of the circle we want to search in
The unit of the radius. Can be m (meters), km (kilometers), mi (miles), ft (feet)
If true, the coordinate of the found members will be returned in the result
If true, the distance between the origin and the found members will be returned in the result
If true, the hash of the found members will be returned in the result
Max number of expected results
The sorting strategy. If empty, order is not guaranteed. Can be ASC (ascending) or DESC (descending)
The Redis store we want to write the result in
The redis storedist we want to write the result in
The found members as GeoRadiusMember instances
Sets the specified fields to their respective values in the hash stored at key.
Sets the specified fields to their respective values in the hash stored at key. This command overwrites any existing fields in the hash. If key does not exist, a new key holding a hash is created.
from fields to values
True if operation completed successfully,
False otherwise.
HashOperations
HashOperations
True if field is a new field in the hash and value was set,
False if field already exists in the hash and the value was updated.
Sets field in the hash stored at key to value.
Sets field in the hash stored at key to value.
If key does not exist, a new key holding a hash is created.
If field already exists in the hash, it is overwritten.
Some(0) if field is a new field in the hash and value was set,
Some(1) if field already exists in the hash and the value was updated.
Sets field in the hash stored at key to value, only if field does not yet exist.
Sets field in the hash stored at key to value, only if field does not yet exist.
If key does not exist, a new key holding a hash is created.
If field already exists, this operation has no effect.
True if field is a new field in the hash and value was set.
False if field exists in the hash and no operation was performed.
Operations
Operations
ListOperations
ListOperations
SetOperations
SetOperations
NodeOperations
NodeOperations
StringOperations
StringOperations
SortedSetOperations
SortedSetOperations
(Since version 2.14) Use the more typesafe variant
(Since version 1.2.0) use slaveof