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

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

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2, 8.0
    • Component/s: contrib - LTR
    • Labels:
      None

      Description

      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.

        Attachments

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

          Issue Links

            Activity

              People

              • Assignee:
                cpoerschke Christine Poerschke
                Reporter:
                yuyano Yuki Yano
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: