Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3556

IndexingConfigurationImpl.getAggregateRules() should return null in case no aggregate rules are configured

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.13, 2.4.3, 2.5.3, 2.6
    • 2.7
    • indexing, jackrabbit-core
    • None

    Description

      Right now the IndexingConfigurationImpl.getAggregateRules() returns an empty array in case no rules are configured as this it is initialized in the init() method as follows:

      aggregateRules = idxAggregates.toArray(new AggregateRule[idxAggregates.size()]);

      so it is never null, but rather an empty array.

      This causes small overhead when updating index in case no aggregate rules are configured (in our case on the version store).

      The org.apache.jackrabbit.core.query.lucene.SearchIndex.retrieveAggregateRoot(Set<NodeId>, Map<NodeId, NodeState>) method opens the reader and searches for terms (_:AGGR_NODE_UUID) in any case.

      Could we change the IndexingConfigurationImpl.init() to set aggregateRules to null when no aggregate rules are configured?

      Attachments

        Activity

          People

            Unassigned Unassigned
            shyrkov Sergiy Shyrkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: