redis-om-spring
redis-om-spring copied to clipboard
@Query and escaping
using 0.5.2-SNAPSHOT
@TagIndexed
@SerializedName(value = "genre", alternate = "Genre")
private List<String> genre;
Page<Movie> findByGenre(@Param("genre") Set<String> genre, Pageable pageable); => works with "Sci-Fi" as Redis OM is escaping automatically the hyphen http://localhost:8080/movie/genre/?genres=Sci-Fi&page=0&size=10 "FT.SEARCH" "io.redis.model.MovieIdx" "@genre:{Sci\-Fi}"
@Query("@genre:{$genre}") Page<Movie> findByGenre(@Param("genre") Set<String> genre, Pageable pageable); => fails as "Sci-Fi" is not escaped for RediSearch in the @Query
is that an expected behavior and/or what would be the SpEL to properly escape in the @Query( ...) syntax ?