Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12367

When adding a model referencing a non-existent feature the error message is very ambiguous

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.3.1
    • Fix Version/s: None
    • Component/s: contrib - LTR
    • Labels:
      None

      Description

      When adding a model that references a non-existent feature a very ambiguous error message is thrown, something like "Model type does not exist org.apache.solr.ltr.model.LinearModel".

       

      To reproduce, do not add any features and just add a model, for example by doing this:

       

      curl -XPUT 'http://localhost:8983/solr/gettingstarted/schema/model-store' --data-binary '

      {

        "class": "org.apache.solr.ltr.model.LinearModel",

        "name": "myModel",

        "features": [ {"name": "whatever" }],

        "params": {"weights": {"whatever": 1.0}}

      }' -H 'Content-type:application/json'

       

      The resulting error message "Model type does not exist org.apache.solr.ltr.model.LinearModel" is extremely misleading and cost me a while to figure out the actual cause.

       

      A more suitable error message should probably indicate the name of the missing feature that the model is trying to reference.

        Attachments

        1. SOLR-12367.patch
          6 kB
          Kamuela Lau
        2. SOLR-12367.patch
          5 kB
          Kamuela Lau
        3. SOLR-12367.patch
          3 kB
          Kamuela Lau

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gs Georg Sorst

              Dates

              • Created:
                Updated:

                Issue deployment