Samy Louize Hanna
Samy Louize Hanna

Reputation: 831

How can i delete element in set Redis?

how can i delete element(s) from sorted set generated from adding location using GEOADD

for example:

GEOADD test -0.12455 51.5007 "Big Ben" -0.12520 51.50115 "Westminster Station" -0.11358 51.50482 "BFI IMAX"

i want to delete "Westminster Station" element , any ideas? and is there away to delete this element using Lettuce Api?

Upvotes: 0

Views: 538

Answers (1)

for_stack
for_stack

Reputation: 22906

The GEO index is implemented with Sorted Set, so you can just use zrem to remove a location.

`zrem test "Westminster Station"`

Upvotes: 1

Related Questions