private static void addSearchChain(SearchChainResolver.Builder builder,
                                       FederationConfig.Target target,
                                       FederationConfig.Target.SearchChain searchChain)
    {
        String id = target.id();
        if (!id.equals(searchChain.searchChainId()))
            throw new RuntimeException("Invalid federation config, " + id + " != " + searchChain.searchChainId());

        ComponentId searchChainId = ComponentId.fromString(id);
        builder.addSearchChain(searchChainId, federationOptions(searchChain), searchChain.documentTypes());
        // Here we make synthetic SearchChain proxies for all cluster.schema combinations possible
        // Given a source on the form searchcluster.schema will rewrite it to source=searchcluster and restrict to schema.
        // TODO Consider solving this in the config model by making many synthetic search clusters
        for (String schema : searchChain.documentTypes()) {
            String virtualChainId = id + "." + schema;
            builder.addSearchChain(ComponentId.fromString(virtualChainId),
                    new SearchChaininvocationProxy(searchChainId, federationOptions(searchChain).setUseByDefault(false), schema));
        }
    }
The name of the query property containing the source name added to the query to each source by this
container-search/src/main/java/com/yahoo/search/federation/FederationSearcher.java