Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When uploading a model, using a not existent store or other incorrect parameters you get:
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","java.lang.ClassCastException"],
"msg":"org.apache.solr.ltr.model.ModelException: Model type does not exist org.apache.solr.ltr.model.LinearModel",
"code":400}}
In the response, logs don't help that much out of the box, I had to go for remote debugging and of course we don't want the generic user to do that.
Reason is in org/apache/solr/ltr/model/LTRScoringModel.java:111
try { // create an instance of the model model = solrResourceLoader.newInstance( className, LTRScoringModel.class, new String[0], // no sub packages new Class[] { String.class, List.class, List.class, String.class, List.class, Map.class }, new Object[] { name, features, norms, featureStoreName, allFeatures, params }); if (params != null) { SolrPluginUtils.invokeSetters(model, params.entrySet()); } } catch (final Exception e) { throw new ModelException("Model type does not exist " + className, e); }
This happens when:
- use a not existent feature store
- use not existent feature
- use an integer instead of Double as a weight in a linear model
unless any objection, we should improve such message with the real one
Attachments
Issue Links
- is related to
-
SOLR-11137 LTR: misleading error message when loading a model
- Resolved
-
SOLR-12676 Improve details on ModelException when the feature of a model has not been defined
- Open
-
SOLR-12367 When adding a model referencing a non-existent feature the error message is very ambiguous
- Open
- links to