Feature File
===========

[
  {
    "store" : "exampleFeatureStore",
    "name" : "isCityName",
    "class" : "org.apache.solr.ltr.feature.FieldValueFeature",
    "params" : { "field" : "CITY_NAME" }
  },
  {
    "store" : "exampleFeatureStore",
    "name" : "originalScore",
    "class" : "org.apache.solr.ltr.feature.OriginalScoreFeature",
    "params" : {}
  },
  {
    "store" : "exampleFeatureStore",
    "name" : "isLat",
    "class" : "org.apache.solr.ltr.feature.FieldValueFeature",
    "params" : { "field" : "LATITUDE" }
  }
]

Model File
==========
{
  "store": "exampleFeatureStore",
  "class": "org.apache.solr.ltr.model.LinearModel",
  "name": "exampleModelStore",
  "features": [{
      "name": "isCityName"
    },
    {
      "name": "isLat"
    },
    {
      "name": "original_score"
    }
  ],
  "params": {
    "weights": {
      "isCityName": 0.0,
      "isLat": 0.0,
      "original_score": 1.0
    }
  }
}



> On Mar 19, 2019, at 2:04 PM, Mohomed Rimash <rim...@yaalalabs.com> wrote:
> 
> Can you share the feature file and the model file,
> 1. I had few instances where invalid values for parameters (ie weights set
> to more than 1 , with minmaxnormalizer) resulted the above error,
> 2, Check all the features added to the model has a weight under params ->
> weights in the model
> 
> 
> On Tue, 19 Mar 2019 at 21:21, Roopa Rao <roop...@gmail.com> wrote:
> 
>> Does your feature definitions and the feature names used in the model
>> match?
>> 
>> On Tue, Mar 19, 2019 at 10:17 AM Amjad Khan <amjad2...@gmail.com> wrote:
>> 
>>> Yes, I did.
>>> 
>>> I can see the feature that I created by this
>>> schema/feature-store/exampleFeatureStore and it return me the features I
>>> created. But issue is when I try to put store-model.
>>> 
>>>> On Mar 19, 2019, at 12:18 AM, Mohomed Rimash <rim...@yaalalabs.com>
>>> wrote:
>>>> 
>>>> Hi Amjad, After adding the libraries into the path, Did you restart the
>>>> SOLR ?
>>>> 
>>>> On Tue, 19 Mar 2019 at 08:45, Amjad Khan <amjad2...@gmail.com> wrote:
>>>> 
>>>>> I followed the Solr LTR Documentation
>>>>> 
>>>>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html <
>>>>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html>
>>>>> 
>>>>> 1. Added library into the solr-config
>>>>> <!--LTR Start-->
>>>>> <lib dir="${solr.install.dir:../../../..}/contrib/ltr/lib/"
>>>>> regex=".*\.jar" />
>>>>> <lib dir="${solr.install.dir:../../../..}/dist/"
>>>>> regex="solr-ltr-\d.*\.jar" />
>>>>> 2. Successfully added feature
>>>>> 3. Get schema to see feature is available
>>>>> 4. When I try to push model I see the error below, however I added the
>>> lib
>>>>> into solr-cofig
>>>>> 
>>>>> Response
>>>>> {
>>>>> "responseHeader":{
>>>>>   "status":400,
>>>>>   "QTime":1},
>>>>> "error":{
>>>>>   "metadata":[
>>>>>     "error-class","org.apache.solr.common.SolrException",
>>>>>     "root-error-class","java.lang.NullPointerException"],
>>>>>   "msg":"org.apache.solr.ltr.model.ModelException: Model type does
>> not
>>>>> exist org.apache.solr.ltr.model.LinearModel",
>>>>>   "code":400}}
>>>>> 
>>>>> Thanks
>>> 
>>> 
>> 

Reply via email to