jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohit Kataria (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-7254) Indexes with excludedPaths, or includedPaths should not be picked for queries without path
Date Fri, 05 Jul 2019 10:47:00 GMT

    [ https://issues.apache.org/jira/browse/OAK-7254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16879137#comment-16879137
] 

Mohit Kataria edited comment on OAK-7254 at 7/5/19 10:46 AM:
-------------------------------------------------------------

Attaching patch ([^0001-OAK-7254-Indexes-with-excludedPaths-or-includedPaths.patch]) to resolve
this issue.

Current implementation is as follows:

A new parameter (strictPathRestriction) has been introduced in QueryEngineSettings which can
be set to ENABLE/DISABLE/WARN to enable, disable and 'log a warning if path restrictions are
not compatible' respectively. 

This property can be changed via JMX beans of queryEngineSettings or via osgi config option
for Query Engine Settings Service

CC: [~tmueller], [~catholicon]


was (Author: tihom88):
Attaching patch to resolve this issue.

Current implementation is as follows:

A new parameter (strictPathRestriction) has been introduced in QueryEngineSettings which can
be set to ENABLE/DISABLE/WARN to enable, disable and 'log a warning if path restrictions are
not compatible' respectively. 

This property can be changed via JMX beans of queryEngineSettings or via osgi config option
for Query Engine Settings Service

CC: [~tmueller], [~catholicon]

> Indexes with excludedPaths, or includedPaths should not be picked for queries without
path
> ------------------------------------------------------------------------------------------
>
>                 Key: OAK-7254
>                 URL: https://issues.apache.org/jira/browse/OAK-7254
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: lucene, query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Critical
>              Labels: indexingPatch
>             Fix For: 1.16.0
>
>         Attachments: 0001-OAK-7254-Indexes-with-excludedPaths-or-includedPaths.patch
>
>
> Queries that don't have a clear path restriction should not use indexes that have excludedPaths
or includedPaths set, except in some exceptional cases (to be defined).
> For example, if a query doesn't have a path restriction, say:
> {noformat}
> /jcr:root//element(*, nt:base)[@status='RUNNING']
> {noformat}
> Then an index that has excludedPaths set (for example to /etc) shouldn't be used, at
least not if a different index is available. Currently it is used currently, actually in _favor_
of another index, if the property "status" is commonly used in /etc. Because of that, the
index that doesn't have excludedPath has a higher cost (as it indexes the property "status"
in /etc, and so has more entries for "status", than the index that doesn't index /etc).
> The same for includedPaths, in case queryPaths isn't set to the same value(s).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message