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 2016/01/20 10:28:39 UTC

[jira] [Updated] (OAK-3725) Add oak:Indexable mixin type

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

Davide Giannella updated OAK-3725:
----------------------------------
    Fix Version/s: 1.4

> Add oak:Indexable mixin type
> ----------------------------
>
>                 Key: OAK-3725
>                 URL: https://issues.apache.org/jira/browse/OAK-3725
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: angela
>            Assignee: Davide Giannella
>             Fix For: 1.4
>
>         Attachments: OAK-3725.patch
>
>
> this morning we discussed a case where adding an oak:index child node somewhere in the hierarchy was not doable because the target node was restrictive in the types of children that can be added (presumably {{nt:folder}} or similar).
> Instead of suggesting to move the index definition up to the root node when the index is actually just needed for the sub-tree, we could fix the situation by shipping oak with a dedicated mixin type that makes an node being able to define it's own oak:index child.
> The mixin type could look as follows:
> {code}
> [oak:Indexable]
>   mixin
>   + oak:index (nt:base) = nt:unstructured COPY
> {code}
> The definition above means:
> - any node holding mixin type oak:Indexable can hold an optional node called {{oak:index}}
> - this node can have any primary type
> - but the default primary type if not specified otherwise (i.e. when calling {{parent.addNode("oak:index")}}) would be {{nt:unstructured}}.
> - if desired however, calling {{parent.addNode("oak:index", "oak:Unstructured")}} would equally work (as any other primary type
> - the COPY flag indicates that the {{oak:index}} node would be copied into the version storage _if_ the parent was versionable and checkin was called.
> NOTE: I am not totally sure OPV flag COPY is really desired here... but it reflects what we are having today with the {{oak:index}} node stored with the root node. maybe that worth a second thought, if we really want the tree defined by oak:index to be copied into the version storage upon every call to {{VersionManager.checkin}}; I am not too familiar with the indexing to decide whether that makes sense or not... from a distant point of view OPV IGNORE might equally make sense.



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