[
https://issues.apache.org/jira/browse/OAK-2944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14593442#comment-14593442
]
Thomas Mueller commented on OAK-2944:
-------------------------------------
Some remarks:
Same as for OAK-2943, it would be great to also have a unit test case in
oak-core, in addition to the test in oak-lucene. Which one is up to you.
There is a missing @Override:
public boolean isSortableIndex() {
return isSortableIndex;
}
About the term isSortableIndex: I first didn't understand what it means. As you
wrote in the Javadoc, it means sorting is done by the index, what about using
the term "isSortedByIndex" instead (for both the field and the method name)? By
the way, this is quite well explained here:
https://www.sqlite.org/queryplanner.html
The private method QueryImpl.isSortUsingIndex is now quite confusing, it should
probably be renamed to canSortByIndex, so it is clear that this method isn't
just a getter but actually calculates that. And I would rename the variable
sortUsingIndex to canSortByIndex as well.
> Support merge iterator for union order by queries
> -------------------------------------------------
>
> Key: OAK-2944
> URL: https://issues.apache.org/jira/browse/OAK-2944
> Project: Jackrabbit Oak
> Issue Type: Sub-task
> Components: query
> Reporter: Amit Jain
> Assignee: Amit Jain
> Labels: perfomance
> Fix For: 1.3.1
>
> Attachments: OAK-2618.patch
>
>
> Currently, any order by union queries (including optimized OR XPATH) scan a
> much larger set when returning the results even when the individual queries
> are sorted by the index itself.
> We should have a merge iterator which would scan a much smaller set as the
> individual queries would be sorted.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)