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 2015/12/10 08:01:10 UTC

[jira] [Comment Edited] (OAK-3403) Multiplexing store support in Property indexes

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

Chetan Mehrotra edited comment on OAK-3403 at 12/10/15 7:00 AM:
----------------------------------------------------------------

Initial implementation on branch done with [62d7621ea8|https://github.com/chetanmeh/jackrabbit-oak/commit/62d7621ea8de5cdd0b182f0a44ccb9d02a960a68].

For mount config like
{noformat}
foo - /a, /m/n
{noformat}

The index structure created looks like below. So index data for paths under /a and /a/m/n would be stored in {{:oak:foo-index}} while others would be stored under {{:index}} as usual

{noformat}
/{jcr:primaryType = rep:root}
    b
      x{foo = abc}
    a{foo = abc}
      x{foo = abc}
    m{foo = abc}
      n{foo = abc}
        o{foo = abc}
    oak:index{jcr:primaryType = nt:unstructured}
      foo{reindexCount = 1, reindex = false, type = property, propertyNames = [foo], jcr:primaryType = oak:QueryIndexDefinition, entryCount = -1}
        :oak:foo-index
          abc
            a{match = true}
              x{match = true}
            m
              n{match = true}
                o{match = true}
        :index
          abc
            b
              x{match = true}
            m{match = true}
{noformat}


was (Author: chetanm):
Initial implementation done with [62d7621ea8|https://github.com/chetanmeh/jackrabbit-oak/commit/62d7621ea8de5cdd0b182f0a44ccb9d02a960a68].

For mount config like
{noformat}
foo - /a, /m/n
{noformat}

The index structure created looks like below. So index data for paths under /a and /a/m/n would be stored in {{:oak:foo-index}} while others would be stored under {{:index}} as usual

{noformat}
/{jcr:primaryType = rep:root}
    b
      x{foo = abc}
    a{foo = abc}
      x{foo = abc}
    m{foo = abc}
      n{foo = abc}
        o{foo = abc}
    oak:index{jcr:primaryType = nt:unstructured}
      foo{reindexCount = 1, reindex = false, type = property, propertyNames = [foo], jcr:primaryType = oak:QueryIndexDefinition, entryCount = -1}
        :oak:foo-index
          abc
            a{match = true}
              x{match = true}
            m
              n{match = true}
                o{match = true}
        :index
          abc
            b
              x{match = true}
            m{match = true}
{noformat}

> Multiplexing store support in Property indexes
> ----------------------------------------------
>
>                 Key: OAK-3403
>                 URL: https://issues.apache.org/jira/browse/OAK-3403
>             Project: Jackrabbit Oak
>          Issue Type: Technical task
>          Components: query
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>
> In Oak one can define an index anywhere in the repository under a special node name {{oak:index}}. For e.g. if you want a property index for {{sling:resourceType}} at root level then you can create the index at /oak:index/resourceType and this index would store the index content at /oak:index/resourceType/:index.
> # Writing - At time of commit the IndexEditor would need to decide where the indexed content for a given path should be stored. To start with it can make use of PathToStoreMapper to decide which node to use the indexed content. For e.g. for /libs the indexed content is stored under :index-pr and for /content :index-sr is used. This is simpler for PropertyIndex where IndexStoreStrategy can be passed the right node
> # Reading - At time of reading the QueryIndex implementation would need to provide a union cursor which can perform lookup from all such store directories for a given index. 
> *Open Items*
> # Supporting unique indexes
> # Introducing new oak:index - Node under oak:index node are special. Depending on parent path it might be possible that they would have to be created in both repositories. For e.g. /oak:index would have to be present in both PR and SR. While /content/foo/oak:index can live only in SR. 



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