would it be possible to get a command like ZREM for the new GEO commands so that one could remove a member added by geoadd ?

Best regards,

Ty

Comment From: badboy

If you want to remove by the name you used in GEOADD, that's already possible. Just use ZREM. The Geo functionality is implemented on top of a normal sorted set, so all sorted set commands still apply.

127.0.0.1:6379> GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania"
(integer) 0
127.0.0.1:6379> TYPE Sicily
zset
127.0.0.1:6379> ZRANGE Sicily 0 -1
1) "Palermo"
2) "Catania"
127.0.0.1:6379> ZREM Sicily Palermo
(integer) 1
127.0.0.1:6379> ZRANGE Sicily 0 -1
1) "Catania"

Comment From: charsyam

@tvmaly Yes, actually geoadd is like zadd. so you can remove it with zrem. But I think georem is more intuitive. https://github.com/antirez/redis/pull/2675

Comment From: antirez

I've the feeling that if we don't add an alias for ZREM this will be among the top questions in the ML / IRC for the next months...

Comment From: tvmaly

Thanks, perhaps just a entry in the docs under GEOREM that just says use ZREM would be enought, at least it would for me.

Comment From: oranagra

This issue was probably posted when the geo commands where new, but i suppose now that much time has passed, it's less relevant and i wanna close it, since the use of ZREM for geo is already established and documented.

I think that one day we wanna make GEO a proper type. i.e. internally it can be written to reuse the zset code, but TYPE command should indicate that it's a geo key, and the RDB file serialization should reflect that as well. Till then, as long as the TYPE indicates that it's a ZSET, and it is documented that ZREM should be used, i don't think we wanna add any command aliases.