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

Add new LTR model which loads the model definition from the external resource



    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 7.2, 8.0
    • contrib - LTR
    • None


      example of committed change's usage:

        "class" : "org.apache.solr.ltr.model.DefaultWrapperModel",
        "name" : "myWrapperModelName",
        "params" : {
          "resource" : "models/myModel.json"

      original summary:
      We add new model which contains only the location of the external model and loads it during the initialization.
      By this procedure, large models which are difficult to upload to ZooKeeper can be available.

      The new model works as the wrapper of existing models, and deligates APIs to them.
      We add two classes by this patch:

      • ExternalModel : a base class for models with external resources.
      • URIExternalModel : an implementation of ExternalModel which loads the external model from specified URI (ex. file:, http:, etc.).

      For example, if you have a model on the local disk "file:///var/models/myModel.json", the definition of URIExternalModel will be like the following.

        "class" : "org.apache.solr.ltr.model.URIExternalModel",
        "name" : "myURIExternalModel",
        "features" : [],
        "params" : {
          "uri" : "file:///var/models/myModel.json"

      If you use LTR with model=myURIExternalModel, the model of myModel.json will be used for scoring documents.


        1. SOLR-11250.patch
          41 kB
          Christine Poerschke
        2. SOLR-11250.patch
          41 kB
          Christine Poerschke
        3. SOLR-11250.patch
          37 kB
          Christine Poerschke
        4. SOLR-11250_master_v4.patch
          49 kB
          Yuki Yano
        5. SOLR-11250_master_v3.patch
          49 kB
          Yuki Yano
        6. SOLR-11250_master_v2.patch
          39 kB
          Yuki Yano
        7. SOLR-11250.patch
          22 kB
          Christine Poerschke
        8. SOLR-11250_master.patch
          20 kB
          Yuki Yano

        Issue Links

          There are no Sub-Tasks for this issue.



              cpoerschke Christine Poerschke
              yuyano Yuki Yano
              0 Vote for this issue
              5 Start watching this issue