Is sorting supported?
See original GitHub issueI use PagingAndSortingRepository. And I try to get pageable parameter by request like this:
@GetMapping("/find")
public Page<Data> find(@PageableDefault(size = Integer.MAX_VALUE, sort = "timestamp") final Pageable pageable) {
return dataRepository.findAll(pageable);
}
But when I try to use Page<Data> findAll(Pageable pageable) I catch UnsupportedOperationException: “Sorting not supported for find all scan operations”.
Is there any way to sort data? Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (7 by maintainers)
Top Results From Across the Web
When to use each Sorting Algorithm - GeeksforGeeks
Merge sort is used when the data structure doesn't support random access since it works with pure sequential access that is forward iterators, ......
Read more >SORT function - Microsoft Support
The SORT function is provided to sort data in an array. If you want to sort data in the grid, it's better to...
Read more >How to Use sorted() and sort() in Python - Real Python
All programmers will have to write code to sort items or data at some point. Sorting can be critical to the user experience...
Read more >not supported between instances of" when sorting two lists ...
The credit of this answer goes to @jasonharper. He said in a comment: If two of your floats are equal, Python is going...
Read more >std::sort - cppreference.com
A sequence is sorted with respect to a comparator comp if for any iterator it pointing to the sequence and any non-negative integer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi May I know how did you fix this scenario, I have the same case Can you provide your approach It would helpful to me a lot Thanks.
Ya I also observed the use of
@EnableScan @EnableScanCount Page<contact> findAll(Pageable pageable);
fails now which used to work in older version . Is it cause now the default sort enum is coming as UNSORTED …this leads to the exception for the sorting check
I guess we should put a UNSORTED check here or something likewise .
`@Override public Page<T> findAll(Pageable pageable) {