Steven Spasbo created SOLR-12676:
------------------------------------

             Summary: Improve details on ModelException when the feature of a 
model has not been defined
                 Key: SOLR-12676
                 URL: https://issues.apache.org/jira/browse/SOLR-12676
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
          Components: contrib - LTR
            Reporter: Steven Spasbo


While trying to create a model definition, I was getting back the response:
{code}
{
  "responseHeader":{
  [...]
  "error":{
    [...]
    "msg":"org.apache.solr.ltr.model.ModelException: Model type does not exist 
org.apache.solr.ltr.model.LinearModel",
    "code":400}
    }
}
{code}

I initially thought this was related to the library, but after a while figured 
out that I had forgotten to create a feature in my feature store. After 
creating that the model was created as expected. 

To recreate this:
{code}
curl -XPOST -H 'Content-Type: application/json' \
-d '{
  "store" : "myStore",
  "name" : "myModel",
  "class" : "org.apache.solr.ltr.model.LinearModel",
  "features" : [{
    "name" : "nonExistentFeature"
  }],
  "params" : {
    "nonExistentFeature" : 1.0
  }
}' http://localhost:8983/solr/$CORE/schema/model-store
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to