@Override
    public void initialize() {
        if (isEnabled()) {
            registeredServiceLocators.forEach(locator -> locator.getRegisteredServiceIndexes()
                .stream()
                .map(RegisteredServiceQueryIndex::getIndex)
                .filter(AttributeIndex.class::isInstance)
                .map(AttributeIndex.class::cast)
                .forEach(index -> {
                    LOGGER.debug("Adding registered service index [{}] supplied by [{}]",
                        index.getAttribute().toString(), locator.getClass().getSimpleName());
                    indexedRegisteredServices.addIndex(index);
                }));
        }
    }
This is {@link DefaultRegisteredServiceIndexService}.

@author Misagh Moayyed
@since 7.3.0
core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/query/DefaultRegisteredServiceIndexService.java