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

indexName logged in QueryImpl is wrong in case of multiple indexes satisfying the query

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.8, 1.6.0, 1.4.25
    • Component/s: query
    • Labels:
      None

      Description

      QueryImpl currently computes the indexName like

       for (IndexPlan p : ipList) {
                          // TODO limit is after all conditions
                          long entryCount = Math.min(maxEntryCount, p.getEstimatedEntryCount());
                          double c = p.getCostPerExecution() + entryCount * p.getCostPerEntry();
                          if (c < cost) {
                              cost = c;
                              if (p.getPlanName() != null) {
                                  indexName += "[" + p.getPlanName() + "]";
                              }
                              indexPlan = p;
                          }
                      }
      

      If there are multiple index plans then indexName contains multiple plan names which causes confusion

         cost for lucene-property[/oak:index/keymatchKeywords][/oak:index/newImport] is 786.0
      

      Instead of concatenating the indexName should be generated outside

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chetanm Chetan Mehrotra
                Reporter:
                chetanm Chetan Mehrotra
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: