问题
In Solr I have a custom Analyzer that has two parameters. I know how to specify this Analyzer in the schema.xml but I'm wondering how I can pass the two arguments either in the schema.xml or runtime in the code.
回答1:
You can not pass parameters to the schema xml at run-time , as far as I know. But you can use the reload command.This can be useful when (backwards compatible) changes have been made to your solrconfig.xml or schema.xml files (e.g. new declarations, changed default params for a , etc...) and you want to start using them without stopping and restarting your whole Servlet Container.
see here
来源:https://stackoverflow.com/questions/9105542/customizing-analyzers-in-solr