@Override protected void init(final Datatype plugin, final Node node) throws Exception { final Map<String,String> params = DOMUtil.toMapExcept(node.getAttributes(), "name", "class"); plugin.setArgs(params); }
@Override protected void init(final Datatype plugin, final Node node) throws Exception { final Map<String,String> params = DOMUtil.toMapExcept(node.getAttributes(), "name", "class"); plugin.setArgs(params); }
@Override protected void init(final CharFilterFactory plugin, final Node node) throws Exception { if (plugin != null) { final Map<String,String> params = DOMUtil.toMapExcept(node.getAttributes(),"class"); final String configuredVersion = params.remove(LUCENE_MATCH_VERSION_PARAM); plugin.setLuceneMatchVersion(parseConfiguredVersion(configuredVersion, plugin.getClass().getSimpleName(), luceneMatchVersion)); plugin.init( params ); charFilters.add( plugin ); } }
@Override protected void init(final TokenFilterFactory plugin, final Node node) throws Exception { if (plugin != null) { final Map<String,String> params = DOMUtil.toMapExcept(node.getAttributes(), "class"); final String configuredVersion = params.remove(LUCENE_MATCH_VERSION_PARAM); plugin.setLuceneMatchVersion(parseConfiguredVersion(configuredVersion, plugin.getClass().getSimpleName(), luceneMatchVersion)); plugin.init(params); filters.add(plugin); } }
@Override protected void init(final TokenizerFactory plugin, final Node node) throws Exception { if (!tokenizers.isEmpty()) { throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Multiple tokenizers defined for: "+node); } final Map<String,String> params = DOMUtil.toMapExcept(node.getAttributes(),"class"); final String configuredVersion = params.remove(LUCENE_MATCH_VERSION_PARAM); plugin.setLuceneMatchVersion(parseConfiguredVersion(configuredVersion, plugin.getClass().getSimpleName(), luceneMatchVersion)); plugin.init(params); tokenizers.add(plugin); }