tihom88 commented on code in PR #2724:
URL: https://github.com/apache/jackrabbit-oak/pull/2724#discussion_r2772380811
##########
oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java:
##########
@@ -1117,12 +1115,6 @@ private SelectorExecutionPlan
getBestSelectorExecutionPlan(
if (p.getSupportsPathRestriction()) {
entryCount = scaleEntryCount(rootState, filter,
entryCount);
}
- if (sortOrder == null || p.getSortOrder() != null) {
- // if the query is unordered, or
- // if the query contains "order by" and the index can
sort on that,
- // then we don't need to read all entries from the
index
- entryCount = Math.min(maxEntryCount, entryCount);
- }
Review Comment:
IMO yes, sorting is something that need complete result set before we can
return results. If we already have index solving sorting, it saves all the jcr
calls we will have to make to all data and then sorting it in memory.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]