Teruhiko Kurosaka wrote:
When the parameter to a token filter is out of
range, or a mandatory paramter is not given, what
is the proper way to fail in the init() and
crate() methods?

Should I throw an RuntimeException? Or should I
simply call SolrCore.log.severe(message)?
Is it OK for create() to return null when the
underlying Filter could be created?


You should throw a SolrException with a useful error message:

throw new SolrException( SolrException.ErrorCode.SERVER_ERROR,
  "useful error here..." );

Assuming you have:
<abortOnConfigurationError>true</abortOnConfigurationError>

in solrconfig.xml, this will give you a large error for any URL (and log it)

Reply via email to