title: Delete from Redis Sorted Set based on JSON Property
body: <p>I have a large number of items stored in a Redis Sorted Set (of the order 100,000) that fairly frequently get updated. These items are objects encoded as JSON strings, and the rank for sorting in the set is derived (on insert, by my code) from a date/time property on the object.</p>
  
  <p>Each item in the set has an Id property (which is a Guid encoded as a string) which uniquely identifies the item within the system.</p>
  
  <p>When these items are updated, I need to either update the item within the sorted set, or delete and reinsert the item. The problem I have is how to find that item to perform the operation.</p>
  
  <p>What I'm currently doing is loading the entire contents of the sorted set into memory, operating on that collection in my code and then writing the complete collection back to Redis. Whilst this works, it's not particularly efficient and won't scale well if the lists start to grow very large.</p>
  
  <p>Would anybody have any suggestions as to how to do this in a more efficient manner? The only unique identifier I have for the items is the Id property as encoded in the item.</p>
  
  <p>Many Thanks,</p>
  
  <p>Richard.</p>