GEORADIU...EMBER_RO(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

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 an valkey-protocol(7) Array reply of matched member names πŸ‘‘
  • if WITHCOORD, WITHDIST, or WITHHASH options are specified, the command returns an valkey-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,y array (longitude,latitude).

πŸ’€ 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 the ANY option for COUNT. not me getting an upgrade 😭
  • Changed in 7.0.0: Added support for uppercase unit names. KM said "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 for STORE or STOREDIST up 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