docs: public synchronized InternalIndex addOrGetIndex(String name, boolean ordered) {
          InternalIndex index = indexesByName.get(name);
          if (index != null) {
              return index;
          }
  
          String[] components = PredicateUtils.parseOutCompositeIndexComponents(name);
          if (components == null) {
              name = PredicateUtils.canonicalizeAttribute(name);
          } else {
              name = PredicateUtils.constructCanonicalCompositeIndexName(components);
          }
  
          index = indexesByName.get(name);
          if (index != null) {
              return index;
          }
  
          index = indexProvider.createIndex(name, components, ordered, extractors, serializationService, indexCopyBehavior,
                  stats.createPerIndexStats(ordered, usesCachedQueryableEntries));
  
          indexesByName.put(name, index);
          attributeIndexRegistry.register(index);
          converterCache.invalidate(index);
  
          indexes = indexesByName.values().toArray(EMPTY_INDEXES);
          if (components != null) {
              InternalIndex[] oldCompositeIndexes = compositeIndexes;
              InternalIndex[] newCompositeIndexes = Arrays.copyOf(oldCompositeIndexes, oldCompositeIndexes.length + 1);
              newCompositeIndexes[oldCompositeIndexes.length] = index;
              compositeIndexes = newCompositeIndexes;
          }
          return index;
      }