SOLR LTR score calculation based on original score

44 Views Asked by At

I'm trying to come up with rescoring option to avoid noise for searchterm using LTR.

Usecase

Search term: test returns 20k records, max score is 240, and least score is 1.2 Now, I wanted to avoid results with score < 12. 12 = (20000/240) (5% off 20000)

LTR Store

(numFound/maxscore) ((5/100)*numFound)

/schema/feature-store/DEFAULT

[
    {
    "name" : "documentQuality",
    "class" : "org.apache.solr.ltr.feature.SolrFeature",
    "params" : {
      "q" : "{!func} product(div(numFound, maxscore), product(0.05, numFound)"
    }
  }
]

/schema/model-store/


{
  "class" : "org.apache.solr.ltr.model.LinearModel",
  "name" : "myModel",
  "features" : [
    { "name" : "documentQuality" }
        
  
  ],"params" : {
    "weights" : {
      "documentQuality" : 1.0
      
    }
  }
}

Log feature

/query?q=drills&rq={!ltr model=myModel reRankDocs=100}&fl=name,id,price,score,[features]

java.lang.RuntimeException: Exception from createWeight for SolrFeature [name=documentQuality, params={q={!func} product(div(numFound, maxscore), product(0.05, numFound)}] Failed to parse feature query.

Looks like these variables are not visible, is there any alternate to perform this rescoring.?

0

There are 0 best solutions below