Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-4507

[oak-mongo.js] oak.indexStats() does not compute counts properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.0, 1.2, 1.4
    • 1.5.5, 1.6.0
    • run
    • None

    Description

      Some methods in oak-mongo.js that use the pathFilter function consider paths that they shouldn't consider. For example, in a 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 should.

      Issues occur in the following functions:

      • oak.indexStats()
      • oak.countChildren()
      • oak.forEachChild()
      • oak.getChildStats()

      Attachments

        1. OAK-4507.patch
          1.0 kB
          Kevin Wellenzohn

        Activity

          People

            mreutegg Marcel Reutegger
            k13n Kevin Wellenzohn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: