factoryState.copyStateFromOldFactory( rootFactory );
final Properties configurationProperties = factoryState.getConfigurationProperties();
BuildContext buildContext = new BuildContext();
IncrementalSearchConfiguration searchConfiguration = new IncrementalSearchConfiguration(
classes,
configurationProperties,
factoryState
);
applySearchMappingToMetadata(
searchConfiguration.getReflectionManager(),
searchConfiguration.getProgrammaticMapping()
);
//FIXME The current initDocumentBuilders
initDocumentBuilders( searchConfiguration, buildContext, searchConfiguration.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.