redis-om-spring icon indicating copy to clipboard operation
redis-om-spring copied to clipboard

Bug: search command not passing sorting parameters

Open ally-jarrett opened this issue 1 year ago • 1 comments

Repository implementation:

Page<Movie> search(String searchCriteria, Pageable pageable);

When you pass sorting criteria via the PageRequest:

PageRequest pageRequest = PageRequest.of(page, size)
                .withSort(Sort.by(Direction.DESC, sortByField));

repository.search("*", pageRequest); 

this translates into the RediSearch query: "FT.SEARCH" "io.redis.model.MovieIdx" "*" "LIMIT" "0" "20" where the query should be: "FT.SEARCH" "io.redis.model.MovieIdx" "*" "SORTBY" "<field>" "DESC" "LIMIT" "0" "20"

The sorting criteria is completely ignored, whereas on other repository methods it is accounted for.

ally-jarrett avatar Jul 23 '22 08:07 ally-jarrett

@ally-jarrett this has been fixed and will be in the next release.

bsbodden avatar Aug 09 '22 18:08 bsbodden

excellent, thanks @bsbodden

ally-jarrett avatar Aug 17 '22 08:08 ally-jarrett