You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Vikas Saurabh (JIRA)" <ji...@apache.org> on 2017/10/03 10:06:00 UTC
[jira] [Comment Edited] (OAK-6776) Correctly use
IndexPlan.supportsPathRestrictions
[ https://issues.apache.org/jira/browse/OAK-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16189490#comment-16189490 ]
Vikas Saurabh edited comment on OAK-6776 at 10/3/17 10:05 AM:
--------------------------------------------------------------
[~tmueller],
bq. Also, if there is a Lucene index with supportsPathRestrictions, and one without, right now always the one with supportsPathRestrictions is used
Competing plans still fight out the cost war - see {{TraversalAvoidanceTest#competingPlans}} \[0].
I agree that even path restrition support lucene indices have a disadvantage against property indices. That can probably be done here.
Btw, even with that I think "not going for traversal" for some cases (OAK-6734) is correct - yes, it doesn't fix lucene's cost evaluation but we should take deterministic path if traversal can be avoided.
\[0]: https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/TraversalAvoidanceTest.java#L105-L107
was (Author: catholicon):
[~tmueller],
bq. Also, if there is a Lucene index with supportsPathRestrictions, and one without, right now always the one with supportsPathRestrictions is used
Competing plans still fight out the cost war - see {{TraversalAvoidanceTest#competingPlans}} \[0].
I agree that even path restrition support lucene indices have a disadvantage against property indices. That can probably be done here.
Btw, even with that I think "not going for traversal" for some cases (OAK-6734) is correct - yes, it doesn't fix lucene's cost evaluation but we should take deterministic path if traversal can be avoided.
\[0]: https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/TraversalAvoidanceTest.java#L97-L99
> Correctly use IndexPlan.supportsPathRestrictions
> ------------------------------------------------
>
> Key: OAK-6776
> URL: https://issues.apache.org/jira/browse/OAK-6776
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: query
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Fix For: 1.8
>
>
> Right now, IndexPlan.supportsPathRestrictions (introduced in OAK-6734) is used in the query engine for some kind of mixed "rule based" and "cost based" [query optimization|https://en.wikipedia.org/wiki/Query_optimization].
> I think the current implementation isn't correct, as (for example) a query with multiple indexes will now use the wrong index in some cases (for example property index, even if the cost of the Lucene index is lower).
> Also, if there is a Lucene index with supportsPathRestrictions, and one without, right now always the one with supportsPathRestrictions is used. This is probably better right now, but once OAK-6735 is resolved, this should be fixed as well.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)