/** * Constructs a schema using the specified resource name and stream. If the is stream is null, the * resource loader will load the schema resource by name. * * @throws FileNotFoundException * @see SolrResourceLoader#openSchema By default, this follows the normal config path directory * searching rules. * @see Config#openResource */ public SubIndexSchema(final String path, final Version luceneMatchVersion) throws FileNotFoundException { this.luceneMatchVersion = luceneMatchVersion; // important - Get the class loader of one of the SIREn class as parent // class loader, otehrwise it is not possible to find the SIREn classes loader = new SolrResourceLoader(null, SubTextField.class.getClassLoader()); final InputStream lis = loader.openSchema(path); this.readSchema(lis); // important - allows filters to complete loading. // For example, StopWordFilterFactory will load the stopwords list at this // point loader.inform(loader); }