factoryState.copyStateFromOldFactory( rootFactory );
final Properties configurationProperties = factoryState.getConfigurationProperties();
BuildContext buildContext = new BuildContext();
IncrementalSearchConfiguration cfg = new IncrementalSearchConfiguration( classes, configurationProperties, factoryState );
applySearchMappingToMetadata( cfg.getReflectionManager(), cfg.getProgrammaticMapping() );
//FIXME The current initDocumentBuilders
initDocumentBuilders( cfg, buildContext, cfg.getProgrammaticMapping() );
final Map<Class<?>, EntityIndexBinding> documentBuildersIndexedEntities = factoryState.getIndexBindings();
Set<Class<?>> indexedClasses = documentBuildersIndexedEntities.keySet();
for ( EntityIndexBinding entityIndexBinding : documentBuildersIndexedEntities.values() ) {
//FIXME improve this algorithm to deal with adding new classes to the class hierarchy.
//Today it seems only safe when a class outside the hierarchy is incrementally added.