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

Learning To Rank model upload fails generically

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 8.9
    • contrib - LTR
    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            abenedetti#1 abenedetti#1
            abenedetti Alessandro Benedetti
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 50m
                50m

                Slack

                  Issue deployment