Skip to content

[BUG] GEOSEARCHSTORE returns an empty array when src points to an empty key #9261

@leibale

Description

@leibale

Describe the bug
Calling GEOSEARCHSTORE with src that points to an empty key will return an empty array (instead of an integer) and will not reset the destination key.

To reproduce

GEOADD destination 0 0 member
(integer) 1
GEOSEARCHSTORE destination source FROMLONLAT 0 0 BYRADIUS 1 km
(empty array)
ZCARD destination
(integer) 1

Expected behavior

GEOADD destination 0 0 member
(integer) 1
GEOSEARCHSTORE destination source FROMLONLAT 0 0 BYRADIUS 1 km
(integer) 0
ZCARD destination
(integer) 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions