Answer the question
In order to leave comments, you need to log in
How to organize the intersection of a set from one record with sets from other records in Redis?
Question:
- The user has a field in the profile where he can enter some set of _arbitrary_ tags (strings) [say, separated by commas]
- And by clicking on the button, you need to get a list of profiles of other users, sorted by the number of the largest matches of tags in this field (eg both have the tags "apple", "nose" and "pushkin" - 3 matches)
I was advised Redis as the most efficient platform for this task. I have not worked with Redis before, but I found out that the intersection of sets can be obtained simply: sinter user:1:tags user:2:tags
However, related questions remain a mystery to me due to inexperience
: records? Those.
sinter user:1:tags user:2:tags
sinter user:1:tags user:3:tags
sinter user:1:tags user:4:tags
...
sinter user:1:tags user:n:tags
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question