docs: protected void planUseOfIndex( QueryContext context,
                                     IndexCostCalculator calculator,
                                     String workspaceName,
                                     ManagedIndex index,
                                     IndexDefinition defn ) {
          // Ask the provider for an index usage component
          IndexUsage planner = evaluateUsage(context, calculator, defn);
          if (planner == null) {
              throw new UnsupportedOperationException("Providers should either override this method or the #evaluateUsage method");
          }
          
          // Does this index apply to any of the ANDed constraints?
          int costEstimate = getCostEstimate();
          List<Constraint> applicableConstraints = new ArrayList<>();
          for (Constraint constraint : calculator.andedConstraints()) {
              if (planner.indexAppliesTo(constraint)) {
                  logger().trace("Index '{0}' in '{1}' provider applies to query in workspace '{2}' with constraint: {3}",
                                 defn.getName(), getName(), workspaceName, constraint);
                  // The index does apply to this constraint ...
                  applicableConstraints.add(constraint);
              }
          }
          if (!applicableConstraints.isEmpty()) {
              long cardinality = index.estimateCardinality(applicableConstraints, context.getVariables());
              long total = index.estimateTotalCount();
              Float selectivity = null;
              if (total > 0L) {
                  double ratio = (double)cardinality / (double)total;
                  selectivity = cardinality <= total ? new Float(ratio) : IndexCostCalculator.MAX_SELECTIVITY;
              }
              calculator.addIndex(defn.getName(), workspaceName, getName(), applicableConstraints, costEstimate, cardinality, 
                                  selectivity);
          }
  
          Collection<JoinCondition> joinConditions = calculator.joinConditions();
          if (joinConditions.isEmpty()) {
              return;
          }
          List<JoinCondition> applicableJoins = new ArrayList<>();
          // Does this index apply to any of the join conditions ...
          for (JoinCondition joinCondition : joinConditions) {
              if (planner.indexAppliesTo(joinCondition)) {
                  logger().trace("Index '{0}' in '{1}' provider applies to query in workspace '{2}' with constraint: {3}",
                                 defn.getName(), getName(), workspaceName, joinCondition);
                  applicableJoins.add(joinCondition);
              }
          }
          
          if (!applicableJoins.isEmpty()) {
              // The index does apply to this constraint, but the number of values corresponds to the total number of values
              // in the index (this is a JOIN CONDITON for which there is no literal values) ...
              long total = index.estimateTotalCount();
              calculator.addIndex(defn.getName(), workspaceName, getName(), applicableJoins, costEstimate, total);
          }
      }