Re:Given path of Ranklib model in Solr Model Json

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re:Given path of Ranklib model in Solr Model Json

Diego Ceccarelli (BLOOMBERG/ LONDON)
Hello isspek,

Unfortunately no, it would be nice to patch RankLib to output the model in json.
Jfyi, I've a script to convert the xml into the json format

https://github.com/bloomberg/lucene-solr/blob/ltr-demo-lucene-solr/py-solr-buzzwords/tree_model.py

Cheers,
Diego

From: [hidden email] At: 11/08/17 14:53:53To:  [hidden email]
Subject: Given path of Ranklib model in Solr Model Json

Hi all,

Is it possible to give path of model file trained by Ranklib directly to
Solr 7.0.0 without converting that model to json.

I try to upload Solr Model as below example, I saw the param "model-file"
given this link
http://lucene.472066.n3.nabble.com/jira-Comment-Edited-SOLR-8542-Integrate-Learning-to-Rank-into-Solr-td4251260.html
<http://lucene.472066.n3.nabble.com/jira-Comment-Edited-SOLR-8542-Integrate-Learning-to-Rank-into-Solr-td4251260.html>  
. Appearently it does not work such this configuration. Is there any support
given external file with param or requiring json converter?

{
    "class":"org.apache.solr.ltr.model.MultipleAdditiveTreesModel",
    "name":"ranklib-model",
    "features":[
    {"name":"contentMatch"},
    {"name":"originalScores"},
    {"name":"titleMatch"}
    ],
    "params":{
                "model-file":"test_data.xml"      
    }
}

Bests,

isspek


--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Reply | Threaded
Open this post in threaded view
|

Re:Given path of Ranklib model in Solr Model Json

isspek
Hi Diego,

My bad I had not given my external store containing features in solr model,
that's why I received error from Solr server. Your code for parsing of tree
works fine. Thank you so much.

isspek



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html