lundi 30 mars 2015

Spring data redis fuzzy search


public class User implements Serializable{
private String guid;
private String username;
private String password;
private String name;


public String getGuid() {
return guid;
}

public void setGuid(String guid) {
this.guid = guid;
}

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public String getPassword() {
return password;
}

public void setPassword(String password) {
this.password = password;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}


I can save a user into redis spring-data-redis Redistemplate: redisTemplate.opsForValue().set("user:"+guid,userDto);


And of course I can get the user by Redistemplate: redisTemplate.opsForValue().get("user:" + guid);


I want to ask one question whether spring-data-redis support fuzzy query. For example, if I want to find all users whose name contain 'Jack', how to do that?


Aucun commentaire:

Enregistrer un commentaire