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 "Kevin Wellenzohn (JIRA)" <ji...@apache.org> on 2016/06/24 09:55:16 UTC

[jira] [Updated] (OAK-4507) [oak-mongo.js] oak.indexStats() does not compute counts properly

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

Kevin Wellenzohn updated OAK-4507:
----------------------------------
       Priority: Trivial  (was: Major)
    Description: 
Some methods in oak-mongo.js that use the pathFilter function consider paths that they shouldn't consider. For example, in a (pretty fresh) AEM installation oak.countChildren("/oak:index/slingResource") counts the children of the following paths:
- /oak:index/slingResource
- /oak:index/slingResourceSuperType
- /oak:index/slingResourceType
- /oak:index/slingResources

The reason is that pathFilter function builds a RegExp that is not terminated by a path separator and hence matches more paths than it shoud.

Issues occur in the following functions:
- oak.indexStats()
- oak.countChildren()
- oak.forEachChild()
        Summary: [oak-mongo.js] oak.indexStats() does not compute counts properly  (was: [oak-mongo.js)

> [oak-mongo.js] oak.indexStats() does not compute counts properly
> ----------------------------------------------------------------
>
>                 Key: OAK-4507
>                 URL: https://issues.apache.org/jira/browse/OAK-4507
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>            Reporter: Kevin Wellenzohn
>            Priority: Trivial
>
> Some methods in oak-mongo.js that use the pathFilter function consider paths that they shouldn't consider. For example, in a (pretty fresh) AEM installation oak.countChildren("/oak:index/slingResource") counts the children of the following paths:
> - /oak:index/slingResource
> - /oak:index/slingResourceSuperType
> - /oak:index/slingResourceType
> - /oak:index/slingResources
> The reason is that pathFilter function builds a RegExp that is not terminated by a path separator and hence matches more paths than it shoud.
> Issues occur in the following functions:
> - oak.indexStats()
> - oak.countChildren()
> - oak.forEachChild()



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