Reputation: 333
Im kind of new to redis, so this question might be stupid, but Im trying to wrap around SINTER command here.
The problem is I have multiple SET, and Im trying to create an INTER on them. When I do it individually its getting me the results, but when I pass multiple args its returning empty. I read documentation on INTER, it tells if any supplied arg is an empty SET it would return nothing, but all my SET is non empty could any one help me please!
# below statement should return {'758', '762', '752'}
127.0.0.1:6379> SINTER Asset:all Asset:id:2275 Asset:id:2280 Asset:id:2269
(empty list or set)
127.0.0.1:6379> SINTER Asset:all Asset:id:2275
"758"
127.0.0.1:6379> SINTER Asset:all Asset:id:2280
"762"
127.0.0.1:6379> SINTER Asset:all Asset:id:2269
"752"
But all other commands like SUNION, SDIFF are working fine.
Upvotes: 0
Views: 731
Reputation: 333
got the required behaviour by performing SUNION on sets and then SINTER on newly created set
127.0.0.1:6379> SUNION ~unionset Asset:id:2275 Asset:id:2280 Asset:id:2269
127.0.0.1:6379> SINTER Asset:all ~unionset
"758"
"762"
"752"
Upvotes: 0