public void intersect_variable_set_test() { using (var redis = new RedisService()) { var ids = new List<string>(); ids.Add("a"); ids.Add("b"); ids.Add("c"); redis.DoIndexBySet<App>("b", "2", "And"); redis.DoIndexBySet<App>("c", "2", "And"); redis.DoIndexBySet<App>("d", "2", "And"); redis.DoIndexBySet<App>("c", "3", "And"); redis.DoIndexBySet<App>("d", "3", "And"); redis.DoIndexBySet<App>("e", "3", "And"); redis.DoIndexBySet<App>("f", "4", "And"); redis.DoIndexBySet<App>("d", "4", "And"); redis.DoIndexBySet<App>("e", "4", "And"); var result = redis.GetIntersectIdsByPropertyFromSets<App>(ids, "2:And", "3:And"); Assert.Equal(result.Count, 1); Assert.Equal(result[0], "c"); var result2 = redis.GetIntersectIdsByPropertyFromSets<App>(ids, "2:And", "4:And"); Assert.Equal(result2.Count, 0); redis.DoIndexBySet<App>("b", "2", "And",true); redis.DoIndexBySet<App>("c", "2", "And",true); redis.DoIndexBySet<App>("d", "2", "And",true); redis.DoIndexBySet<App>("c", "3", "And",true); redis.DoIndexBySet<App>("d", "3", "And",true); redis.DoIndexBySet<App>("e", "3", "And",true); redis.DoIndexBySet<App>("c", "4", "And",true); redis.DoIndexBySet<App>("d", "4", "And",true); redis.DoIndexBySet<App>("e", "4", "And",true); } }