You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the existing like can only support fulltext, not support % like SQL
eg:
List comList = entityStream.of(Blocks.class).filter(Blocks$.BLOCKED.eq(true))
.filter(Blocks$.USER_ID.eq("100007")).filter(Blocks$.NICK_NAME.like("GoodAbc%"))
.collect(Collectors.toList());
if DB nick_name ="GoodAbc100007"
above will not find out
if input full nick_name like
List comList = entityStream.of(Blocks.class).filter(Blocks$.BLOCKED.eq(true))
.filter(Blocks$.USER_ID.eq("100007")).filter(Blocks$.NICK_NAME.like("GoodAbc100007"))
.collect(Collectors.toList());
then it have result correctly
so question is, any way to support like Blocks$.NICK_NAME.like("GoodAbc%") or Blocks$.NICK_NAME.like("GoodAbc*") ?
redis om spring version :0.9.7
spring boot version:3.4.0
jdk: openjdk 17.0.6
jedis:5.2.0
The text was updated successfully, but these errors were encountered:
The like predicated works by adding "%%%" + query + "%%%" effectively turning into a Fuzzy search https://redis.io/docs/latest/develop/interact/search-and-query/query/full-text/
The number of % signifies the "word distance", as in find all documents that contain a word that has a distance of three to a ( potentially misspelled) word.
In the future I might add a predicate that is just a taken literally and place in the query. Stay tuned...
the existing like can only support fulltext, not support % like SQL
eg:
List comList = entityStream.of(Blocks.class).filter(Blocks$.BLOCKED.eq(true))
.filter(Blocks$.USER_ID.eq("100007")).filter(Blocks$.NICK_NAME.like("GoodAbc%"))
.collect(Collectors.toList());
if DB nick_name ="GoodAbc100007"
above will not find out
if input full nick_name like
List comList = entityStream.of(Blocks.class).filter(Blocks$.BLOCKED.eq(true))
.filter(Blocks$.USER_ID.eq("100007")).filter(Blocks$.NICK_NAME.like("GoodAbc100007"))
.collect(Collectors.toList());
then it have result correctly
so question is, any way to support like Blocks$.NICK_NAME.like("GoodAbc%") or Blocks$.NICK_NAME.like("GoodAbc*") ?
redis om spring version :0.9.7
spring boot version:3.4.0
jdk: openjdk 17.0.6
jedis:5.2.0
The text was updated successfully, but these errors were encountered: