The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

409481 (1) [Avatar] Offline
#1
Quoted from section 1.3.3:
On some sites, articles are typically only in one or two groups at most (“all articles” and whatever group best matches the article). In that situation, it would make more sense to keep the group that the article is in as part of the article’s HASH, and add one more ZINCRBY call to the end of our article_vote() function.


Which key should the ZINCRBY be called on?
josiah.carlson (79) [Avatar] Offline
#2
In this case, I was trying to imply that you could create a per-group score: and/or time: zset, so you wouldn't need to intersect against the group sets. You'd add (perhaps) to score:<groupname>:, maybe increment both sorted sets scores on votes, etc. It's not a great example because work has to be duplicated, but it offers an alternative to needing to intersect to get something (big intersections in Redis can be slow).