public IndexSchema create(String resourceName,SolrConfig config){
  SolrResourceLoader loader=config.getResourceLoader();
  InputStream schemaInputStream=null;
  if (null == resourceName) {
    resourceName=IndexSchema.DEFAULT_SCHEMA_FILE;
  }
  try {
    schemaInputStream=loader.openSchema(resourceName);
  }
 catch (  Exception e) {
    final String msg="Error loading schema resource " + resourceName;
    log.error(msg,e);
    throw new SolrException(ErrorCode.SERVER_ERROR,msg,e);
  }
  InputSource inputSource=new InputSource(schemaInputStream);
  inputSource.setSystemId(SystemIdResolver.createSystemIdFromResourceName(resourceName));
  IndexSchema schema=new IndexSchema(config,resourceName,inputSource);
  return schema;
}

public IndexSchema create ( String resourceName , SolrConfig config ) { SolrResourceLoader loader = config . getResourceLoader ( ) ; InputStream schemaInputStream = null ; if ( null == resourceName ) { resourceName = IndexSchema . DEFAULT_SCHEMA_FILE ; } try { schemaInputStream = loader . openSchema ( resourceName ) ; } catch ( Exception e ) { final String msg = "Error loading schema resource " + resourceName ; log . error ( msg , e ) ; throw new SolrException ( ErrorCode . SERVER_ERROR , msg , e ) ; } InputSource inputSource = new InputSource ( schemaInputStream ) ; inputSource . setSystemId ( SystemIdResolver . createSystemIdFromResourceName ( resourceName ) ) ; IndexSchema schema = new IndexSchema ( config , resourceName , inputSource ) ; return schema ; }
returns an index schema created from a local resource
