if ( builder == null ) {
throw new HibernateException( "Not a mapped entity (don't forget to add @Indexed): " + clazz );
}
if ( builder.getIdKeywordName() != null ) {
idFieldNames.add( builder.getIdKeywordName() );
allowFieldSelectionInProjection = allowFieldSelectionInProjection && builder.allowFieldSelectionInProjection();
}
final DirectoryProvider[] directoryProviders = builder.getDirectoryProviderSelectionStrategy()
.getDirectoryProvidersForAllShards();
searcherSimilarity = checkSimilarity( searcherSimilarity, builder );
populateDirectories( directories, directoryProviders );