docs: @Override
     public void cacheStarting(ComponentRegistry cr, Configuration cfg, String cacheName) {
        InternalCacheRegistry icr = cr.getGlobalComponentRegistry().getComponent(InternalCacheRegistry.class);
        if (!icr.isInternalCache(cacheName) || icr.internalCacheHasFlag(cacheName, Flag.QUERYABLE)) {
           AdvancedCache<?, ?> cache = cr.getComponent(Cache.class).getAdvancedCache();
           ClassLoader aggregatedClassLoader = makeAggregatedClassLoader(cr.getGlobalComponentRegistry().getGlobalConfiguration().classLoader());
           SearchIntegrator searchFactory = null;
           boolean isIndexed = cfg.indexing().index().isEnabled();
           if (isIndexed) {
              setBooleanQueryMaxClauseCount();
  
              cr.registerComponent(new ShardAllocationManagerImpl(), ShardAllocatorManager.class);
              searchFactory = createSearchIntegrator(cfg.indexing(), cr, aggregatedClassLoader);
  
              KeyTransformationHandler keyTransformationHandler = new KeyTransformationHandler(aggregatedClassLoader);
              cr.registerComponent(keyTransformationHandler, KeyTransformationHandler.class);
  
              createQueryInterceptorIfNeeded(cr.getComponent(BasicComponentRegistry.class), cfg, cache, searchFactory, keyTransformationHandler);
              addCacheDependencyIfNeeded(cacheName, cache.getCacheManager(), cfg.indexing());
  
              cr.registerComponent(new QueryBox(), QueryBox.class);
           }
  
           registerMatcher(cr, searchFactory, aggregatedClassLoader);
  
           cr.registerComponent(new EmbeddedQueryEngine(cache, isIndexed), EmbeddedQueryEngine.class);
        }
     }