I'm using Jedis
to store some documents on Redis
.
I have the following class:
public class Document{
public String id;
public String title;
public Map<String, Keyword> keywords = new HashMap<>();
}
I used sadd
to add a set to Redis. I tried the following code:
Document d = new Document();
jedis.sadd(d.id,d.title);
But I don't know how to add the map in the set.