GEORADIU...EMBER_RO(3valkey)
GEORADIUSBYMEMBER_RO π (a Valkey Command Manual moment)
okay bestie, pull up a chair, we're doing geospatial β¨
πΈ NAME πΈ
georadiusbymember_ro β hands you back the members chilling inside a geospatial index that are within a certain distance from another member. it's giving "who's near my girl" energy π«Ά
π SYNOPSIS π
GEORADIUSBYMEMBER_RO key member radius <M | KM | FT | MI> [WITHCOORD]
[WITHDIST] [WITHHASH] [COUNT count [ANY]] [ASC | DESC]
β¨ DESCRIPTION β¨
so this is the read-only variant of the GEORADIUSBYMEMBER command. like, the same girl but she will NOT be writing anything down. π
it's literally identical to GEORADIUSBYMEMBER, except it does not support the optional STORE and STOREDIST parameters. no saving, no storing, just vibes and reading. periodt.
π¦ Alternative π¦
if you want the glow-up version, use GEOSEARCH with the BYRADIUS and FROMMEMBER arguments. iykyk β¨
π REPLY π
you get one of these, depending on the fit:
- if no
WITH*option is specified, you get anvalkey-protocol(7)Array reply of matched member names π - if
WITHCOORD,WITHDIST, orWITHHASHoptions are specified, the command returns anvalkey-protocol(7)Array reply of arrays, where each sub-array represents a single item:- the distance from the center as a floating point number, in the same unit specified in the
radius. - the Geohash integer.
- the coordinates as a two items
x,yarray (longitude,latitude).
- the distance from the center as a floating point number, in the same unit specified in the
π COMPLEXITY π
O(N+log(M)) β where N is the number of elements inside the bounding box of the circular area delimited by center and radius, and M is the number of items inside the index. math girlies stay winning π§
π ACL CATEGORIES π
@geo @read @slow
π HISTORY π
- Available since:
3.2.10β a true elder, an icon, she's been here π - Changed in
6.2.0: Added theANYoption forCOUNT. not me getting an upgrade π - Changed in
7.0.0: Added support for uppercase unit names.KMsaid "let me SHOUT" and honestly? slay.
π SEE ALSO π
geoadd(3valkey), geodist(3valkey), geohash(3valkey), geopos(3valkey), georadius(3valkey), georadiusbymember(3valkey), georadius_ro(3valkey), geosearch(3valkey), geosearchstore(3valkey)
go read those too, they're all in the same friend group π«Ά
reminder bestie: this one is read-only fr fr, so don't go looking forSTOREorSTOREDISTup in here. they are NOT invited to this party π
version 9.0.0 Β· 2025-10-21 Β· that's the whole page, ily, go map something gorgeous πβ¨π¦
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms