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 "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2017/10/14 16:37:00 UTC

[jira] [Commented] (OAK-6831) Nodetype index support in Lucene Index

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

Chetan Mehrotra commented on OAK-6831:
--------------------------------------

Some nodes on nodetype related queries

A mixin rule implies 2 modes
* mixin directly present on node - Index the jcr:mixins property
* mixin type is inherited by primary time - Index the jcr:primaryType of the node

The query on a mixin would translate in a OR query for the actual mixin and inherited types

> Nodetype index support in Lucene Index
> --------------------------------------
>
>                 Key: OAK-6831
>                 URL: https://issues.apache.org/jira/browse/OAK-6831
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: lucene
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>             Fix For: 1.8
>
>
> Lucene indexes currently support nodetype index in some form by specifying a property definition for "jcr:primaryType" with propertyIndex=true. However this can cause issue if such rules are mixed with other rules. 
> For supporting usecase where same lucene index supports multiple nodetype rules and can be used as pure nodetype index we should have a explicit support for indexing nodetypes.
> *Proposal*
> Any indexRule would support following properties
> * {{nodeTypeIndex}} - Boolean indicating if this rule is for nodetype indexing
> * {{sync}} - If nodetype index is sync
> if {{nodeTypeIndex}} is enabled then any explicit property definition would be ignored. With this mode following index definition would be safe to use
> {noformat}
> /oak:index/nodeTypeLucene
>   - jcr:primaryType = "oak:QueryIndexDefinition"
>   - compatVersion = 2
>   - type = "lucene"
>   - async = "async"
>   + indexRules
>     + nt:file
>       - nodeTypeIndex = true
>     + app:Component
>       - nodeTypeIndex = true
> {noformat}
> Here the rule order would not cause any affect as for any matching rule the nodes primary and mixin types would be indexed



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)