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 "Davide Giannella (JIRA)" <ji...@apache.org> on 2014/08/04 12:00:22 UTC

[jira] [Commented] (OAK-1992) Improve queries on relative properties with different node type

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

Davide Giannella commented on OAK-1992:
---------------------------------------

What if we have two queries like

{noformat}
/jcr:root/content/data//element(*, Page)
    [(jcr:content/@jcr:lastModified = xs:dateTime('2013-05-09T09:44:01.403Z')]
{noformat}

and 

{noformat}
/jcr:root/content/data//element(*, PageContent)
    [(@jcr:lastModified = xs:dateTime('2013-05-09T09:44:01.403Z')]
{noformat}

should we have then two indexes or would it be good to have an index
definition like:

{noformat}
propertyNames : ["jcr:content/jcr:lastModified", "jcr:lastModified"]
declaringNodeTypes : ["Page", "PageContent"]
type : "property"
{noformat}

The definition would say then

* index all {{jcr:lastModified}} for {{Page}} or {{PageContent}}
* index all {{jcr:lastModified}} for node with names {{jcr:content}}
  when descending from {{Page}} or {{PageContent}}

While the above should be achievable and should save on the space
needed in the repository for storing the index (node counts and actual
space on disk), don't want it would result in complex index
implementation and we rather opt for a space increase but cleaner
index algorithm by defining two separate indexes.

Plus I have doubts that could actually deliver accurate results with
the above index definition.


> Improve queries on relative properties with different node type
> ---------------------------------------------------------------
>
>                 Key: OAK-1992
>                 URL: https://issues.apache.org/jira/browse/OAK-1992
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: query
>            Reporter: Thomas Mueller
>
> Let's assume there is a node "/data/testNode" (nodetype "Page") and a child node "/data/testNode/jcr:content" (nodetype "PageContent"). Also, there is an index "jcr:lastModified" on node type "PageContent". Now the following query can not use that index, because neither the index implementation nor the query engine "know" that the index can be used:
> {noformat}
> /jcr:root/content/data//element(*, Page)
>     [(jcr:content/@jcr:lastModified = xs:dateTime('2013-05-09T09:44:01.403Z')]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)