[ 
https://issues.apache.org/jira/browse/OAK-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chetan Mehrotra updated OAK-2634:
---------------------------------
    Attachment: OAK-2634.patch

[patch|^OAK-2634.patch] for the same

# It is assumed that indexes would only index the local name part of a node 
name and would not deal with the namespaces. So the restriction would be added 
for local name
# It introduces a new {{QueryConstant}} class in the spi package which has a 
constant defined 
{code}
public abstract class QueryConstant {

    /**
     * Name of the property restriction used to express query performed
     * via NAME and LOCALNAME functions
     */
    public static final String RESTRICTION_LOCAL_NAME = ":localname";
}
{code}
# {{RESTRICTION_LOCAL_NAME}} value starts with colon so that it does not clash 
with actual property restriction (in JCR property name cannot start with colon 
':'). 
# {{NodeNameImpl}} and {{NodeLocalNameImpl}} would push down property 
restriction against above name when operator is EQUAL and LIKE. 

There is a pending TODO to extract local name in {{NodeNameImpl}} as I am not 
sure on the various rules

[~tmueller] Can you review the approach taken. If approach looks fine we can 
add more testcase then.

> QueryEngine should expose name query as property restriction
> ------------------------------------------------------------
>
>                 Key: OAK-2634
>                 URL: https://issues.apache.org/jira/browse/OAK-2634
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: query
>            Reporter: Chetan Mehrotra
>             Fix For: 1.2
>
>         Attachments: OAK-2634.patch
>
>
> Currently {{NodeNameImpl}} and {{NodeLocalNameImpl}} do not add restriction 
> to a filter hence query index cannot handle such queries.
> To allow faster execution name related restriction can be converted to a 
> property restriction



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to