Hello,
I've scanned the forum but haven't found anybody having the problem I have.
I am implementing sorting and all works fine except for the fact that the sorting happens before the result page is returned.
In other words, suppose I have 3 pages and I am trying to sort page #1 by person's last name for example. The first page contains names through A to G. When I sort the 1st page as DESC the last names will be from Z to M instead of from G to A.
Here's the code that fetches the page and applies sorting.
Code:
fullTextQuery.setSort(
new Sort(new SortField (
sortableColumnName, SortField.STRING, isReverseSort))
);
fullTextQuery
.setFirstResult(paging.getOffset())
.setMaxResults(paging.getPageSize());
fullTextQuery.list();
is there any way I can make it sort only the results of the requested page?
Would appreciate some hints,
Oleg