[
https://issues.apache.org/jira/browse/OAK-1137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13822298#comment-13822298
]
Michael Dürig commented on OAK-1137:
------------------------------------
I think what Jukka meant was to make the query implementation to use the hidden
back reference property as an additional index.
However resolving references through queries is nasty business. The query
result only returns nodes for each of which you still have to manually go
through all of its properties to find the desired one. Alex' approach is much
cleaner here as a quick glance at {{IdentifierManager#getReferences}} shows.
Regarding not being able to access the hidden back reference property I don't
think we should promote access to the underlying node state to the Tree API as
this would break encapsulation. What about not hiding this property? We could
automatically add a mixin (e.g. oak:references) to referenceable nodes, which
declares such back references as a protected property.
> Node.getReferences() is slow due to missing property index
> ----------------------------------------------------------
>
> Key: OAK-1137
> URL: https://issues.apache.org/jira/browse/OAK-1137
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core, jcr
> Affects Versions: 0.10
> Reporter: Tobias Bocanegra
> Assignee: Alex Parvulescu
> Priority: Critical
> Fix For: 0.12
>
> Attachments: OAK-1137.patch
>
>
> Node.getReferences() traverses all items in the repository in order to find
> the properties that reference the given node. this is super slow and does not
> scale.
> the (weak) reference properties should be auto-indexed.
--
This message was sent by Atlassian JIRA
(v6.1#6144)