Yuki Yano created SOLR-11302:
--------------------------------
Summary: Flexible LTR model which uses DSL for describing the
scoring function
Key: SOLR-11302
URL: https://issues.apache.org/jira/browse/SOLR-11302
Project: Solr
Issue Type: Improvement
Security Level: Public (Default Security Level. Issues are Public)
Components: contrib - LTR
Reporter: Yuki Yano
Priority: Minor
Attachments: SOLR-11302_master.patch
We implment new LTR model which uses DSL for describing the scoring function.
This model is inspired by the implementation of {{JavascriptCompiler}} which
compiles javascript codes by using ANTLR and ASM.
The syntax of our DSL is based on Java and FunctionQuery, and we can describe
various models freely by using the DSL.
Please see {{ltr/dsl/package-info.java}} for more details.
The configuration of our model looks like belows:
{code}
{
"class":"org.apache.solr.ltr.model.DSLModel",
"name":"dslmodel",
"features":[
{"name":"popularity"},
{"name":"normHits"},
{"name":"isTrendy"}
],
"params":{
"dsl": "(0.2 * popularity / 10 + 0.3 * normHits) * if(isTrendy==1, 2.0,
1.0)"
}
}
{code}
This approach is similar to re-ranking with FunctionQuery, except that our
model compiles the DSL into bytecodes on ahead and can calculate scores faster.
In practice, the performance of the model is depended on the structure of
formula.
For example, if we convert existing models (i.e., {{LinearModel}} and
{{MultipleAdditiveTreesModel}}) to DSLs and compare the performance (with large
models),
our model is 4.5x slower than {{LinearModel}} but 1.5x faster than
{{MultipleAdditiveTreesModel}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]